DocumentBase.CustomXMLParts Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belgedeki özel XML bölümlerini döndürür.
public:
property Microsoft::Office::Core::CustomXMLParts ^ CustomXMLParts { Microsoft::Office::Core::CustomXMLParts ^ get(); };
public Microsoft.Office.Core.CustomXMLParts CustomXMLParts { get; }
member this.CustomXMLParts : Microsoft.Office.Core.CustomXMLParts
Public ReadOnly Property CustomXMLParts As CustomXMLParts
Özellik Değeri
Belgedeki özel XML bölümlerini içeren bir Microsoft.Office.Core.CustomXMLParts koleksiyonu.
Örnekler
Aşağıdaki kod örneği, geçerli belgedeki koleksiyona CustomXMLParts bir Microsoft.Office.Core.CustomXMLPart
ekleyerek çalışan verilerini belgeye ekler. Bu örneği kullanmak için belge düzeyi projesindeki sınıfından ThisDocument
çalıştırın.
private void AddCustomXmlPartToDocument()
{
string xmlString =
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
"<employees xmlns=\"http://schemas.microsoft.com/vsto/samples\">" +
"<employee>" +
"<name>Karina Leal</name>" +
"<hireDate>1999-04-01</hireDate>" +
"<title>Manager</title>" +
"</employee>" +
"</employees>";
Office.CustomXMLPart employeeXMLPart = this.CustomXMLParts.Add(xmlString, missing);
}
Private Sub AddCustomXmlPartToDocument()
Dim xmlString As String = _
"<?xml version=""1.0"" encoding=""utf-8"" ?>" & _
"<employees xmlns=""http://schemas.microsoft.com/vsto/samples"">" & _
"<employee>" & _
"<name>Karina Leal</name>" & _
"<hireDate>1999-04-01</hireDate>" & _
"<title>Manager</title>" & _
"</employee>" & _
"</employees>"
Dim employeeXMLPart As Office.CustomXMLPart = _
Me.CustomXMLParts.Add(xmlString)
End Sub
Açıklamalar
Office projelerinde özel XML bölümlerini kullanma hakkında daha fazla bilgi için bkz. Özel XML Bölümlerine Genel Bakış.