This document is archived and information here might be outdated.  Recommended version.


IXmlPropertySet2.GetXml Method (ArcObjects .NET 10.5 SDK)
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
[C#]
public string GetXml (
    string Name
);
[C++]
HRESULT GetXml(
  BSTR Name,
  BSTR* xml
);
[C++]

Parameters 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.

Remarks

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