Method XmlNode():createDocument() Foundation

Creates a document node representing an XML document.

Syntax
CLASS METHOD :createDocument( <cRoot> [,<cVersion>] [,<cEncoding>] [,<lStandalone>] ) --> oXmlNode
Parameters
<cRoot>
A character string with the document node name of the XML document.
<cVersion>
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".
<cEncoding>
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".
<lStandalone>
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..
Return

An XmlNode() object representing the new document node.

Description

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.

Feedback

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.