User Tools

Site Tools


DzDomDocument

DAZ Script DOM document node.

More...

Inherits :

Constructors

DAZ Script
DzDomDocument ()
DzDomDocument ( String filename )

Methods

Detailed Description

Represents a DOM document. This is typically the only DOM node that you will construct directly, all other nodes should be created as a member of a document by calling one of the following functions: * createElement( String tagName )

Constructors


DzDomDocument()

Default constructor


DzDomDocument( String filename )

Overloaded constructor. Loads the given file name as the content for this document.

Methods


DzDomNode : createAttribute( String name )

Return Value:


DzDomNode : createAttributeNS( String nsURI, String qName )

Return Value:

  • A new attribute node using the given namespace that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createCDATASection( String value )

Return Value:

  • A new CDATA node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createComment( String value )

Return Value:

  • A new comment node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createDocumentFragment()

Return Value:

  • A new document fragment node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createElement( String tagName )

Return Value:

  • A new element node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createElementNS( String nsURI, String qName )

Return Value:

  • A new element node using the given namespace that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createEntityReference( String name )

Return Value:

  • A new entity reference node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createProcessingInstruction( String target, String data )

Return Value:

  • A new processing instruction node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : createTextNode( String value )

Return Value:

  • A new text node that is a member of this document. You must still add it as a child of the document or one of its nodes

DzDomNode : doctype()

Return Value:

  • The document type node for this document.

See Also:


DzDomNode : elementById( String id )

Return Value:

  • The element with the given id. If no matching element was found, an invlaid (Null) node is returned.

DzDomNode : importNode( DzDomNode node, Boolean deep )

Return Value:

  • A new node that is a member of this document that is a (deep) copy of the given node. You must still add it as a child of the document or one of its nodes. If deep is true, the node and all its children are imported recursively.

Boolean : loadContent( String filename )

Sets the content of the document by reading the file with the given string.

Return Value:

  • true if the file was successfully loaded and parsed, false if an error was encountered.

Boolean : saveContent( String filename )

Saves the contents of the document to the file with the given name.

Return Value:

  • true if the file was successfully saved, false if an error occurred

Boolean : setContent( String text )

Sets the content of the document from the given string.

Return Value:

  • true if the string was successfully parsed, false if an error was encountered.

String : toString()

Return Value:

  • The contents of the document as a single string.