Standalone (XmlDoc property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (edits, tags and links)
 
m (edits, tags and links)
Line 49: Line 49:
</p></ol>
</p></ol>


==Request-Cancellation Errors (for set method)==
==Request-Cancellation Errors/ (for set method)==
<ul>
<ul>
<li>The <var>Version</var> property is the null string, and <var class="term">newString</var> is not the null string.
<li>The <var>Version</var> property is the null string, and <var class="term">newString</var> is not the null string.

Revision as of 17:44, 6 June 2011

Standalone specification in "XML declaration" (XmlDoc class)

Standalone sets or return the value of standalone in the "XML declaration," if any, at the beginning of the serialized XML document.

Syntax

%currentString = doc:Standalone doc:Standalone = newString

Syntax terms

%currentString The string value of doc's Standalone property.
doc An XmlDoc object expression.
newString The string value to assign to doc's Standalone property. The only values to which you may set the Standalone property are:
  • The null string
  • yes
  • no

Usage notes

  • The initial value of Standalone is the null string.
  • If a document is deserialized into an XmlDoc, the value of Standalone 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 is also a non-null string.

Examples

  1. 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)

  • The Version property is the null string, and newString is not the null string.
  • newstring is invalid.

See also