XMLNode.XML Özellik

Tanım

Denetimdeki XML metnini temsil eden bir dize alır XMLNode .

public Microsoft.Office.Tools.Word.XMLNode_XMLType XML { get; }

Özellik Değeri

XMLNode_XMLType

Denetimdeki XML metnini temsil eden bir dize XMLNode .

Örnekler

Aşağıdaki kod örneği, XML XMLNode Word XML biçimlendirmesi olmadan ve ' nin XML içeriğini göstermek için özelliğini kullanır. Bu örnek, geçerli belgenin adlandırılmış bir ada sahip olduğunu varsayar XMLNode CustomerNode .

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]);
}
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

Açıklamalar

XMLÖzelliği aşağıdaki parametreyle kullanılmak üzere tasarlanmıştır.

Parametre Açıklama
ListTemplate trueWord XML biçimlendirmesi olmadan XML metnini döndürmek için; Aksi takdirde, false . Varsayılan değer: false.

XMLÖzelliğini bir parametre belirtmeden kullanırsanız, XMLNode_XMLType doğrudan kodunuzdan kullanılması amaçlanmayan bir nesne döndürür.

İsteğe Bağlı Parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi için bkz. Office çözümlerinde Isteğe bağlı parametreler.

Şunlara uygulanır