DOM_Document

External objects

Properties Methods 

Properties

$fullschemavalidationIf true,and $parservalidates is also true,and the parser will validate against a schema,the parser performs additional checks against the schema
$ignoreparserwarningsIf true,the parser ignores problems categorized as warnings
$includeignorablewhitespaceIf true,and $parservalidates is also true,the parser includes ignorable whitespace in the DOM tree it generates
$localnameThe local part of the qualified name of the node (read only)
$namespaceuriThe namespace URI of the node,or empty if it is unspecified (read only)
$nodenameThe name of the node (not assignable)
$nodetypeThe type of the node (one of the kXMLNode... constants)
$nonamespaceschemalocationIf specified,this property becomes the noNamespaceSchemaLocation attribute for the document being parsed
$outputencodingThe output encoding used by $savefile and $savebinary; one of the kXMLEncoding... constants
kXMLEncodingISO8859 kXMLEncodingUSASCII kXMLEncodingUTF16BE kXMLEncodingUTF16LE kXMLEncodingUTF8
$parservalidatesIf true,the document must have a DTD or schema against which the parser validates the document during $loadfile and $loadbinary
$prefixThe namespace prefix of the node,or empty if it is unspecified
$replaceentityreferencesIf true,the parser replaces each entity reference with the value to which it resolves
$schemalocationIf specified,this property becomes the schemaLocation attribute for the document being parsed
$useobjectrefsIf true,the object works with object references rather than objects (so object return values are object references and object parameters must be object references)

Methods

$appendchild$appendchild(oObj,&cErrorText) appends oObj to the end of the list of children; returns true for success,or false and cErrorText for failure
$childnodes$childnodes(&cErrorText) returns a node list object listing the children of this object, or NULL and cErrorText if an error occurs
$clonenode$clonenode(bRecursive) returns a new object which is a copy of the node (and its children if bRecursive is true)(note: cloning an element with bRecursive = false also clones the attributes)
$createattribute$createattribute(cName,&cErrorText) returns a new DOM Attr object with the specified attribute name,or NULL and cErrorText if an error occurs
$createattributens$createattributeNS(cURI,cQualifiedName,&cErrorText) returns a new DOM Attr object with the specified URI and name,or NULL and cErrorText if an error occurs
$createcdatasection$createcdatasection(cData,&cErrorText) returns a new DOM CDATA Section object containing the string cData,or NULL and cErrorText if an error occurs
$createcomment$createcomment(cData,&cErrorText) returns a new DOM Comment object containing the string cData,or NULL and cErrorText if an error occurs
$createdocumentfragment$createdocumentfragment(&cErrorText) returns a new empty DOM Document Fragment object,or NULL and cErrorText if an error occurs
$createelement$createelement(cTagName,&cErrorText) returns a new DOM Element object with the specified tag name,or NULL and cErrorText if an error occurs
$createelementns$createelementNS(cURI,cQualifiedName,&cErrorText) returns a new DOM Element object with the specified URI and name,or NULL and cErrorText if an error occurs
$createentityreference$createentityreference(cName,&cErrorText) returns a new DOM Entity Reference object with the specified attribute name,or NULL and cErrorText if an error occurs
$createprocessinginstruction$createprocessinginstruction(cTarget,cData,&cErrorText) returns a new DOM Processing Instruction object containing the target cTarget and string cData,or NULL and cErrorText if an error occurs
$createtextnode$createtextnode(cData,&cErrorText) returns a new DOM Text object containing the string cData,or NULL and cErrorText if an error occurs
$doctype$doctype() returns the DOM Document Type object for this XML document
$documentelement$documentelement() returns the DOM Element object representing the root of this XML document
$firstchild$firstchild() returns the first child of this object; NULL if there are no children
$getchildbyid$getchildbyid(iChildId) returns the object corresponding to the non-zero child id iChildId,or null if no such child exists
$getelementbyid$getelementbyid(cId,&cErrorText) returns the DOM Element object with the specified id,or NULL and cErrorText if an error occurs
$getelementsbytagname$getelementsbytagname(cTagName,&cErrorText) returns a node list object listing the elements with the name cTagName, or NULL and cErrorText if an error occurs. cTagName = '*' matches all tag names
$getelementsbytagnamens$getelementsbytagnameNS(cURI,cLocalName,&cErrorText) returns a node list object listing the elements with the URI cURI and name cLocalName,or NULL and cErrorText if an error occurs.'*' matches all URIs or local names or both
$hasattributes$hasattributes() returns true if the node is an element which has attributes
$haschildnodes$haschildnodes() returns true if the object has children
$importnode$importnode(oNode,bDeep,&cErrorText) creates an object containing a copy of the node oNode,copied recursively if bDeep is true;returns the object,or NULL and cErrorText if an error occurs
$insertbefore$insertbefore(oObjToInsert,oObjBefore,&cErrorText) inserts oObjToInsert into the list of children,before oObjBefore; returns true for success,or false and cErrorText for failure
$issupported$issupported(cFeature,cVersion) returns true if the specified version of the specified feature is supported
$lastchild$lastchild() returns the last child of this object; NULL if there are no children
$loadbinary$loadbinary(xData,&cErrorText[,cSearchDir]) loads the binary XML data stream xData into the document object; returns true for success,or false and cErrorText for failure
$loadfile$loadfile(cPath,&cErrorText) loads the XML file with pathname cPath into the document object; returns true for success,or false and cErrorText for failure
$loadlist$loadlist(lList,&cErrorText,[cDocTemplatePath]) loads list lList defining an XML document into object; returns true for success,or false and cErrorText for failure.cDocTemplatePath is an empty XML document; this allows a DTD to be specified
$nextsibling$nextsibling() returns the next sibling of this object; NULL if there is no next sibling
$ownerdocument$ownerdocument() returns the owner document containing this object
$parentnode$parentnode() returns the parent object of this object; NULL if there is no parent
$previoussibling$previoussibling() returns the previous sibling of this object; NULL if there is no previous sibling
$qckappendcdatasection$qckappendcdatasection(iChildId,cData,&cErrorText) appends new CDATA Section node to end of list of children of node iChildId;returns new node id for success,or zero and cErrorText for failure
$qckappendcomment$qckappendcomment(iChildId,cData,&cErrorText) appends new comment node to end of list of children of node iChildId;returns new node id for success,or zero and cErrorText for failure
$qckappendelement$qckappendelement(iChildId,cTagName,&cErrorText[,cAttName1,cAttValue1,...]) appends new element node and up to 4 attributes to end of list children of node iChildId;returns new node id for success,or zero and cErrorText for failure
$qckappendprocessinginstruction$qckappendprocessinginstruction(iChildId,cTarget,cData,&cErrorText) appends new processing instruction node to end of list of children of node iChildId;returns new node id for success,or false and cErrorText for failure
$qckappendtext$qckappendtext(iChildId,cData,&cErrorText) appends new text node to end of list of children of node iChildId;returns new node id for success,or zero and cErrorText for failure
$removechild$removechild(oObj,&cErrorText) removes oObj from the list of children; returns true for success,or false and cErrorText for failure
$replacechild$replacechild(oObjNew,oObjOld,&cErrorText) replaces oObjOld in the list of children,with oObjNew; returns true for success,or false and cErrorText for failure
$savebinary$savebinary(&xXML,&cErrorText[,bStripDT=kFalse,iFmt=kXMLformatNone]) saves XML to binary variable xXML;returns true for success,or false and cErrorText;strips prolog DOCTYPE if bStripDT is true;kXMLFormat... constant iFmt controls formatting
$savefile$savefile(cPath,&cErrorText[,bStripDT=kFalse,iFmt=kXMLformatNone]) saves XML to pathname cPath;returns true for success,or false and cErrorText;strips prolog DOCTYPE if bStripDT is true;kXMLFormat... constant iFmt controls formatting
$savelist$savelist(&lList,&cErrorText[,bSkipWhiteSpace=kTrue]) saves the XML specified by the object into the list lList,skipping whitespace if specified; returns true for success,or false and cErrorText for failure
$savetree$savetree(&lList,&cErrorText,bExpanded[,bIgnoreDocumentElement=kFalse,bSkipWhiteSpace=kTrue]) saves the XML specified by the document object to a list suitable for displaying in a data bound tree object
$setempty$setempty() discards the current contents of the document object; returns true for success, false for failure