Sets the value of the standalone
attribute in the XML declaration to "yes" or "no". If set to True, the XML declaration appears as the following in XML output:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
oMXXMLWriter.standalone = boolValue boolValue = oMXXMLWriter.standalone
Boolean. Read/write. The default value is False. The standalone declaration indicates if a document relies on information from an external source, such as external document type definition (DTD), for its content.
If set to False, the XML parser will accept external resources, if there are any, without reporting an error. If set to True, the parser reports an error if the document references an external DTD or external entities.
The following example reads books.xml and writes the value of the standalone
attribute to "yes" in the XML declaration.
Dim rdr As New Msxml2.SAXXMLReader50 Dim cnth As IVBSAXContentHandler Dim wrt As New MXXMLWriter50 wrt.indent = True wrt.standalone = True Set cnth = wrt Set rdr.contentHandler = cnth rdr.parseURL ("books.xml") MsgBox wrt.output
[propput] HRESULT standalone ( [in] VARIANT_BOOL fValue);
[propget] HRESULT standalone ( [out, retval] VARIANT_BOOL * fValue);
Value | Description |
---|---|
True | The value of standalone is set to "yes". |
False (default) | The value of standalone is set to "no". |
To view reference material for Visual Basic or C++ only, click the Language Filter button in the upper-left corner of the page.
Applies to: MXXMLWriter CoClass