The om package / The DomNode class |
Methods of the om.DomNode class.
Name | Description |
---|---|
appendChild( node om.DomNode ) |
Adds an existing node at the end of the list of children in the current node. |
createChild( tag STRING ) RETURNING result om.DomNode |
Creates and adds an node at the end of the list of children in the current node. |
insertBefore( new om.DomNode, existing om.DomNode ) |
Inserts an existing node before the existing node specified. |
removeChild( node om.DomNode ) |
Deletes the specified child node from the current node. |
replaceChild( new om.DomNode, old om.DomNode ) |
Replaces a node by another in the children nodes of the current node. |
Name | Description |
---|---|
loadXml( filename STRING ) RETURNING result om.DomNode |
Load an XML file into the current node. |
parse( string STRING ) RETURNING result om.DomNode |
Parses an XML formatted string and creates the DOM structure in the current node. |
toString() RETURNING result STRING |
Serializes the current node into an XML formatted string. |
writeXml( filename STRING ) |
Creates an XML file from the current DOM node. |
write( sdh om.SaxDocumentHandler ) |
Processes a DOM document with a SAX document handler. |
Name | Description |
---|---|
getId() RETURNING result INTEGER |
Returns the internal AUI tree id of a DOM node. |
getTagName() RETURNING result STRING |
Returns the XML tag name of a DOM node. |
Name | Description |
---|---|
setAttribute( name STRING, value STRING ) |
Sets the value of a DOM node attribute. |
getAttribute( name STRING ) RETURNING result STRING |
Returns the value of a DOM node attribute. |
getAttributeInteger( name STRING, def STRING ) RETURNING result INTEGER |
Returns the value of a DOM node attribute, with default integer value. |
getAttributeString( name STRING, def STRING ) RETURNING result STRING |
Returns the value of a DOM node attribute, with default string value. |
getAttributesCount() RETURNING result INTEGER |
Returns the number of attributes in the DOM node. |
getAttributeName( index INTEGER ) RETURNING result STRING |
Returns the name of a DOM node attribute by position. |
getAttributeValue( index INTEGER ) RETURNING result STRING |
Returns the value of a DOM node attribute by position. |
removeAttribute( name STRING ) RETURNING result STRING |
Delete the specified attribute from the DOM node. |
Name | Description |
---|---|
getChildCount() RETURNING result INTEGER |
Returns the number of children nodes. |
getChildByIndex( index INTEGER ) RETURNING result om.DomNode |
Returns a child DOM node by position. |
getFirstChild() RETURNING result om.DomNode |
Returns the first child DOM node. |
getLastChild() RETURNING result om.DomNode |
Returns the last child DOM node. |
getNext() RETURNING result om.DomNode |
Returns the next sibling DOM node of this node. |
getParent() RETURNING result om.DomNode |
Returns the parent DOM node. |
getPrevious() RETURNING result om.DomNode |
Returns previous sibling DOM node of this node. |
selectByTagName( tagname STRING ) RETURNING result om.NodeList |
Finds descendant DOM nodes according to a tag name. |
selectByPath( xpath STRING ) RETURNING result om.NodeList |
Finds descendant DOM nodes according to an XPath-like pattern. |