ArcObjects Library Reference (GeoDatabase)  

IXmlPropertySet2.GetXml Method

Returns the XML corresponding to the specified element as a string.

[Visual Basic .NET]
Public Function GetXml ( _
    ByVal Name As String _
) As String
public string GetXml (
    string Name
  BSTR Name,
  BSTR* xml


Name [in]   Name is a parameter of type BSTR xml [out, retval]   xml is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


The GetXml method returns both the metadata element tag (including attributes/values pairs) and the corresponding value as string.

Specifying an XML element with children nodes will return all children elements and values also.

Because the return variable is of type string, specifying enclosures, images or pictures return the data encoded as Base64 inside of XML tags (unless TransformImages has been called).

If repeating elements are specified, i.e. "idinfo/keywords/theme/themekey", nothing will be returned.  More detailed criteria are necessary when specifying the Name parameter. This can be achieved with an XPath query.  More information on XPath can be found at the IXmlPropertySet documentation and through documentation below.

See Also

IXmlPropertySet2 Interface