Getting Started > Use Lua Scripts > Method Reference > XmlNode Methods

XmlNode Methods
attr
Returns first XmlAttr attribute object for this element.
Syntax
attr()
Returns
An XmlAttr object.
content
Returns the content (text element) of the xml node.
Syntax
content()
Returns
A string containing the content.
firstChild
Returns XmlNode which is the first child of this node.
Syntax
firstChild()
Returns
An xmlNode.
lastChild
Returns XmlNode which is the last child of this node.
Syntax
lastChild()
Returns
An xmlNode.
name
Returns the name of the xml node.
Syntax
name()
Returns
A string containing the name.
next
Returns XmlNode which is the next sibling of this node.
Syntax
next()
Returns
An xmlNode.
nodePath
Returns the Xml path to the node which can be used in another XPath query.
Syntax
nodePath()
Returns
A string containing the path.
parent
Returns the parent XmlNode of the node.
Syntax
parent()
Returns
An xmlNode.
prev
Returns XmlNode which is the previous sibling of this node.
Syntax
prev()
Returns
An xmlNode.
type
Returns the type of the node as a string.
Syntax
type()
Returns
A string containing the type. Possible values are:
element_node comment_node element_decl
attribute_node document_node attribute_decl
text_node document_type_node entity_decl
cdata_section_node document_frag_node namespace_decl
entity_ref_node notation_node xinclude_start
entity_node html_document_node xinclude_end
pi_node dtd_node docb_document_node