User Tools

Site Tools


DzDomElement

DAZ Script DOM element node.

More...

Inherits :

Properties

DAZ Script
StringtagName

Constructors

DAZ Script
DzDomElement ()

Methods

DAZ Script
Stringattribute ( String name )
Stringattribute ( String name, String defValue )
DzDomNodeattributeNode ( String name )
DzDomNodeattributeNodeNS ( String nsURI, String localName )
StringattributeNS ( String nsURI, String localName, String defValue )
BooleanhasAttribute ( String name )
BooleanhasAttributeNS ( String nsURI, String localName )
voidremoveAttribute ( String name )
DzDomNoderemoveAttributeNode ( DzDomNode oldAttr )
voidremoveAttributeNS ( String nsURI, String localName )
voidsetAttribute ( String name, String value )
DzDomNodesetAttributeNode ( DzDomNode newAttr )
DzDomNodesetAttributeNodeNS ( DzDomNode newAttr )
voidsetAttributeNS ( String nsURI, String qName, String value )

Detailed Description

Represents an element node in a DOM document.

Properties


String : tagName

The tag name of the element.

Constructors


DzDomElement()

Default constructor. Typically, you will not construct these directly, but will call DzDomDocument::createElement() to create a new element node as a member of a document.

Methods


String : attribute( String name )

Return Value:

  • The value of the attribute with the given name, or an empty string if the attribute does not exist.

String : attribute( String name, String defValue )

Return Value:

  • The value of the attribute with the given name, or defValue if the attribute does not exist.

DzDomNode : attributeNode( String name )

Return Value:

  • The node that represents the attribute called name. If the attribute does not exist, an invalid (Null) node is returned

DzDomNode : attributeNodeNS( String nsURI, String localName )

Return Value:

  • The node that represents the attribute called name in the nsURI namespace. If the attribute does not exist, an invalid (Null) node is returned.

String : attributeNS( String nsURI, String localName, String defValue )

Return Value:

  • The attribute called localName with the namespace nsURI. If the attribute does not exist, defValue is returned.

Boolean : hasAttribute( String name )

Return Value:

  • true if the element has an attribute with the given name, otherwise, returns false

Boolean : hasAttributeNS( String nsURI, String localName )

Return Value:

  • true if the element has an attribute with the given name and namespace, otherwise, returns false

void : removeAttribute( String name )

Removes the attribute called name.


DzDomNode : removeAttributeNode( DzDomNode oldAttr )

Removes oldAttr from the element.

Return Value:

  • The attribute that was removed.

void : removeAttributeNS( String nsURI, String localName )

Removes the attribute called name in the namespace.


void : setAttribute( String name, String value )

Adds an attribute called name with value. If an attribute with the given name already exists, it value is set to value.


DzDomNode : setAttributeNode( DzDomNode newAttr )

Adds newAttr to this element. If an attribute with the same name already exists, it is replaced with the new one.

Return Value:

  • The attribute that was replaced by newAttr. If no attribute was replaced, an invalid (Null) node is returned.

DzDomNode : setAttributeNodeNS( DzDomNode newAttr )

Adds newAttr to this element. If an attribute with the same name already exists, it is replaced with the new one.

Return Value:

  • The attribute that was replaced by newAttr. If no attribute was replaced, an invalid (Null) node is returned.

void : setAttributeNS( String nsURI, String qName, String value )

Adds an attribute called qName in the nsURI namespace with value. If an attribute with the given name already exists, it value is set to value.