Sets the value of the standalone attribute in the XML declaration to "yes" or "no".
Property Let IMXWriter_standalone(ByVal RHS As Boolean) Property Get IMXWriter_standalone() As Boolean
oMXXMLWriter.standalone = boolValue boolValue = oMXXMLWriter.standalone
Boolean. Read/write.
The following example reads books.xml and writes the value of the standalone attribute to "yes" in the XML declaration.
XML File
Use books.xml.
Visual Basic File (Form1.frm)
Private Sub Command1_Click()(
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
End Sub
Try It!
Output
When run, the sample Visual Basic application should display the contents of books.xml in a message box. The file XML declaration should have its standalone attribute set to "yes", like this:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
[propput] HRESULT standalone ( [in] VARIANT_BOOL fValue);
[propget] HRESULT standalone ( [out, retval] VARIANT_BOOL * fValue);
| Value | Description |
|---|---|
| True | Sets the value of the standalone attribute to "yes". |
| False (default) | Sets the value of the standalone attribute to "no". |
The XSLProcessor object implements the standalone property as follows:
<xsl:output> in the XSLT style sheet used by the processor. Otherwise, a default value of VARIANT_FALSE is returned.To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
MXHTMLWriter CoClass | MXXMLWriter CoClass | Sample XML File (books.xml)
Applies to: IMXWriter Interface