Share via


XMLNode.XML Property (2007 System)

Gets a string that represents the XML text in the XMLNode control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property XML As XMLNode._XMLType
'Usage
Dim instance As XMLNode 
Dim value As XMLNode._XMLType 

value = instance.XML
[BrowsableAttribute(false)]
public XMLNode._XMLType XML { get; }
[BrowsableAttribute(false)]
public:
property XMLNode._XMLType^ XML {
    XMLNode._XMLType^ get ();
}
public function get XML () : XMLNode._XMLType

Property Value

Type: Microsoft.Office.Tools.Word.XMLNode._XMLType
A string that represents the XML text in the XMLNode control.

Remarks

The XML property is intended to be used with the following parameter.

Parameter

Description

ListTemplate

true to return the text of the XML without the Word XML markup; otherwise, false. The default is false.

If you attempt to use XML without specifying a parameter, XML will get an XMLNode._XMLType object that is part of the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example uses the XML property to display the XML contents of an XMLNode with and without the Word XML markup. This example assumes that the current document contains an XMLNode named CustomerNode.

Private Sub DisplayXML()
    MsgBox("The XML of '" & Me.CustomerNode.BaseName & _
        "' without the Word markup: " & Me.CustomerNode.XML(True))

    MsgBox("The XML of '" & Me.CustomerNode.BaseName & _
        "' with the Word markup: " & Me.CustomerNode.XML(False))
End Sub
private void DisplayXML()
{
    MessageBox.Show("The XML of '" + this.CustomerNode.BaseName +
        "' without the Word markup: " + this.CustomerNode.XML[true]);

    MessageBox.Show("The XML of '" + this.CustomerNode.BaseName +
        "' with the Word markup: " + this.CustomerNode.XML[false]);
}

.NET Framework Security

See Also

Reference

XMLNode Class

XMLNode Members

Microsoft.Office.Tools.Word Namespace