Proprietà Document.XMLSchemaReferences (System 2007)

Aggiornamento: novembre 2007

Ottiene un insieme di XMLSchemaReferences che rappresenta tutti gli schemi collegati al documento.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Sintassi

<BrowsableAttribute(False)> _
Public ReadOnly Property XMLSchemaReferences As XMLSchemaReferences

Dim instance As Document
Dim value As XMLSchemaReferences

value = instance.XMLSchemaReferences
[BrowsableAttribute(false)]
public XMLSchemaReferences XMLSchemaReferences { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Word.XMLSchemaReferences

Insieme di XMLSchemaReferences che rappresenta gli schemi collegati al documento.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato come visualizzare l'URI di ognuno degli schemi XML a cui si fa riferimento nel documento.

Questo esempio è per una personalizzazione a livello di documento.

Private Sub DocumentXMLSchemaReferences()
    Dim stringBuilder1 As New System.Text.StringBuilder()

    ' Add all of the schema URIs to the StringBuilder.
    Dim schema As Word.XMLSchemaReference
    For Each schema In Me.XMLSchemaReferences
        stringBuilder1.Append(schema.NamespaceURI & ", ")
    Next schema

    ' End the StringBuilder with a period.
    stringBuilder1.Remove(stringBuilder1.Length - 2, 2)
    stringBuilder1.Append(".")

    MessageBox.Show("The document contains " & Me.XMLSchemaReferences.Count.ToString() _
        & " schema(s): " & stringBuilder1.ToString())
End Sub 
private void DocumentXMLSchemaReferences()
{
    System.Text.StringBuilder stringBuilder1 =
        new System.Text.StringBuilder();

    // Add all of the schema URIs to the StringBuilder.
    foreach (Word.XMLSchemaReference schema in
        this.XMLSchemaReferences)
    {
        stringBuilder1.Append(schema.NamespaceURI + ", ");
    }

    // End the StringBuilder with a period.
    stringBuilder1.Remove(stringBuilder1.Length - 2, 2);
    stringBuilder1.Append(".");

    MessageBox.Show("The document contains " +
        this.XMLSchemaReferences.Count.ToString() +
        " schema(s): " + stringBuilder1.ToString());
}

Autorizzazioni

Vedere anche

Riferimenti

Document Classe

Membri Document

Spazio dei nomi Microsoft.Office.Tools.Word