XML:clear([path])

Delete all attributes and child elements from an element. If no path is specified, clear will affect the current element. If a valid path is specified, clear will affect the specified element and will also set the current position to be the element specified by the path. Returns true on success or false on failure.

Example

doc = xml.parse([[<foo><bar>bartext</bar><baz>baztext</baz></foo>]])
doc:goPath('/foo')
doc:clear()