DzDomDocument Class Reference
[DOM and XML Objects]

DAZ Script DOM document node. More...

Inheritance diagram for DzDomDocument:

DzDomNode List of all members.

Methods

DzDomNode createAttribute (String name)
DzDomNode createAttributeNS (String nsURI, String qName)
DzDomNode createCDATASection (String value)
DzDomNode createComment (String value)
DzDomNode createDocumentFragment ()
DzDomNode createElement (String tagName)
DzDomNode createElementNS (String nsURI, String qName)
DzDomNode createEntityReference (String name)
DzDomNode createProcessingInstruction (String target, String data)
DzDomNode createTextNode (String value)
DzDomNode doctype ()
DzDomNode elementById (String id)
DzDomNode importNode (DzDomNode node, Boolean deep)
Boolean loadContent (String filename)
Boolean saveContent (String filename)
Boolean setContent (String text)
String toString ()

Constructors

 DzDomDocument (String filename)
 DzDomDocument ()

Detailed Description

DAZ Script DOM document node.

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:


Constructor & Destructor Documentation

DzDomDocument::DzDomDocument (  ) 

Default constructor

DzDomDocument::DzDomDocument ( String  filename  ) 

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


Member Function Documentation

DzDomNode DzDomDocument::createAttribute ( String  name  ) 

Returns:
A new attribute node that is a member of this document. You must still add it to an element in the document by calling DzDomElement::setAttributeNode(). An easier way to add attributes to an element is to call DzDomElement::setAttribute().

DzDomNode DzDomDocument::createAttributeNS ( String  nsURI,
String  qName 
)

Returns:
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 DzDomDocument::createCDATASection ( String  value  ) 

Returns:
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 DzDomDocument::createComment ( String  value  ) 

Returns:
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 * DzDomDocument::createDocumentFragment (  ) 

Returns:
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 DzDomDocument::createElement ( String  tagName  ) 

Returns:
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 DzDomDocument::createElementNS ( String  nsURI,
String  qName 
)

Returns:
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 DzDomDocument::createEntityReference ( String  name  ) 

Returns:
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 DzDomDocument::createProcessingInstruction ( String  target,
String  data 
)

Returns:
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 DzDomDocument::createTextNode ( String  value  ) 

Returns:
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 * DzDomDocument::doctype (  ) 

Returns:
The document type node for this document.
See also:
DzDomDocumentType

DzDomNode DzDomDocument::elementById ( String  id  ) 

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

DzDomNode DzDomDocument::importNode ( DzDomNode  node,
Boolean  deep 
)

Returns:
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 DzDomDocument::loadContent ( String  filename  ) 

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

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

Boolean DzDomDocument::saveContent ( String  filename  ) 

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

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

Boolean DzDomDocument::setContent ( String  text  ) 

Sets the content of the document from the given string.

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

String DzDomDocument::toString (  ) 

Returns:
The contents of the document as a single string.


Generated on Thu Sep 24 12:21:11 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.