Standalone (XmlDoc property)
Standalone specification in "XML declaration" (XmlDoc class)
Standalone sets or returns the value of standalone in the "XML declaration," if any, at the beginning of the serialized XML document.
%currentString = doc:Standalone doc:Standalone = newString
|%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 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
standalonein the "XML declaration" of the document, if there was one.
The possible Standalone values after deserialization are:
- The null string
- Standalone may be set to a non-null string only if the value of the Version property is also a non-null string.
The following example sets the Version and Standalone properties:
The example result follows:
<?xml version="1.0" standalone="yes"?> <a/>
Request-cancellation errors (for set method)
This list is not exhaustive: it does not include all the errors that are request cancelling.
- The Version property is the null string, and the newString argument is not the null string.
- newString is invalid.