Function
Initialize properties
'args' is just mixed in with no further processing.
Arguments to initialize properties path: A simplified XPath to an attribute, a text or elements
Function
A root node
Return an attribute value, a text value or an array of elements
This method first uses a root node passed in 'object' argument and 'path' property to identify an attribute, a text or elements. If 'path' starts with a slash (absolute), the first path segment is ignored assuming it point to the root node. (That is, "/a/b/@c" and "b/@c" against a root node access the same attribute value, assuming the root node is an element with a tag name, "a".)
A value found, otherwise 'undefined'
Node|undefined|String||Array
Function
A root node
A value to set
Set an attribute value or a child text value to an element
This method first uses a root node passed in 'object' argument and 'path' property to identify an attribute, a text or elements. If an intermediate element does not exist, it creates an element of the tag name in the 'path' segment as a child node of the current node. Finally, 'value' argument is set to an attribute or a text (a child node) of the leaf element.
Node|to be returned as a new object|undefined
Function
A node
An expression for attribute, text or elements
Return an attribute value, a text value or an array of elements
If 'exp' starts with '@', an attribute value of the specified attribute is returned. If 'exp' is "text()", a child text value is returned. Otherwise, an array of child elements, the tag name of which match 'exp', is returned.
A value found, otherwise 'undefined'
String||Array
Function
A node
An expression for attribute or text
A value to set
Set an attribute value or a child text value to an element
If 'exp' starts with '@', 'value' is set to the specified attribute. If 'exp' is "text()", 'value' is set to a child text.
Function
A parent node
A tag name
Return a child node
A child element of the tag name specified with 'name' is returned. If 'name' ends with an array index, it is used to pick up the corresponding element from multiple child elements.
A child node
Node|null
Function
Return a DOM document
If 'node' is specified, a DOM document of the node is returned. Otherwise, a DOM document is created.
A DOM document
Document
Object
Object