Standalone (XmlDoc property): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
[[Category:XmlDoc methods|Standalone property]] | [[Category:XmlDoc methods|Standalone property]] | ||
[[Category:XmlDoc API methods]] | [[Category:XmlDoc API methods]] | ||
<!--DPL?? Category:XmlDoc methods|Standalone property: Standalone specification in "XML declaration"--> | <!--DPL?? Category:XmlDoc methods|Standalone property: Standalone specification in "XML declaration"--> | ||
<!--DPL?? Category:XmlDoc API methods|Standalone (XmlDoc property): Standalone specification in "XML declaration"--> | <!--DPL?? Category:XmlDoc API methods|Standalone (XmlDoc property): Standalone specification in "XML declaration"--> |
Revision as of 20:03, 31 December 2010
Standalone specification in "XML declaration"
Standalone is a member of the XmlDoc class.
This property indicates the value of standalone in the “XML declaration,” if any, at the beginning of the serialized XML document.
Syntax
%curr = doc:Standalone
doc:Standalone = newvalue
Syntax Terms
- %curr
- The string value of doc's Standalone property.
- doc
- An XmlDoc object expression.
- newvalue
- The string value to assign to doc's Standalone property.
Usage Notes
- The only values to which you may set the Standalone property are:
- The null string
- yes
- no
The initial value of the property is the null string.
- If a document is deserialized into an XmlDoc, the value of the
Standalone property of the XmlDoc
will be the value specified for standalone in the “XML
declaration” of the document, if there was one.
The possible Standalone values after deserialization are:
- The null string
- yes
- no
- Standalone may be set to a non-null string only if the value of the Version property (??Version) is also a non-null string.
Example
The following example sets the Version and Standalone properties:
Begin %doc Object XmlDoc %doc:LoadXml('<a/>') %doc:Version = '1.0' %doc:Standalone = 'yes' %doc:Print End
The example result follows:
<?xml version="1.0" standalone="yes"?> <a/>
Request-Cancellation Errors (for set method)
- Version property is the null string, and newvalue is not the null string.
- newvalue is invalid.