Method XmlNode():createDocument() Foundation

Creates a document node representing an XML document.

CLASS METHOD :createDocument( <cRoot> [,<cVersion>] [,<cEncoding>] [,<lStandalone>] ) --> oXmlNode
A character string with the document node name of the XML document.
A character string with the version of the XML standard this XML document conforms to. The <cVersion> parameter is optional. The default value is "1.0".
The character encoding as an IANA string. Typically, this is "ISO-8859-1" through "ISO-8859-9" or "UTF-8". "ISO-8859-1". Parameter <cEncoding> is optional. It defaults to "ISO-8859-1".
A logical value specifying whether this document has a DTD. If the document has a DTD, .T. (true) must be passed in <lStandalone>. Otherwise, .F. (false) must be passed. The default value for <lStandalone> is .T..

An XmlNode() object representing the new document node.


The method :createDocument() creates a document node which represents an empty XML document. The supported version of the XML standard as well as the character encoding and standalone marker are a part of the XML document declaration section, can optionally be specified via the method's parameters.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.