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


IXmlPropertySet Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IXmlPropertySet Interface

Provides access to members that manage metadata. Note: the IXmlPropertySet interface has been superseded byIXmlPropertySet2. Please consider using the more recent version.

Product Availability

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

Members

Description
Read-only property CountX Number of occurrances of an element in the metadata.
Method DeleteProperty Deletes the specified elements.
Method DeletePropertyByAttribute Deletes the elements which have the specified attribute value.
Method GetPropertiesByAttribute Returns the set of names and values for elements which have the specified attribute value.
Method InitExisting Initializes an XmlPropertySet and adds the Esri group of elements.
Read-only property IsNew Indicates if a new XmlPropertySet was created on retrieving the metadata.
Method SaveAsFile Transforms the metadata using an XSL stylesheet if specified, writes out the header if specified, and saves it in a file.
Method SetAttribute Sets the attribute of the specified element.
Method SetPropertyX Sets the value of the specified element.
Method SimpleGetProperty The values of the specified property.
Method TransformImages Transforms encoded thumbnail and image enclosures to files and links them into the metadata.

CoClasses that implement IXmlPropertySet

CoClasses and Classes Description
XmlPropertySet Esri XML PropertySet object.

Remarks

This interface uses XPath, a way to select a node or groups of nodes that match a selection criteria, as parameters in several methods and properties (CountX property, DeleteProperty method, SetAttribute method, SetPropertyX method, and SimpleGetProperty method).  XPath provides a simple query language for identifying nodes in an XML document based on attribute, name, and values. 

An important point when using XPath is that the names of properties and attributes, as well as the values of both, are case sensitive. Also, because metadata always has a <metadata> root node, it can be omitted from patterns used with this interface. For example, "/metadata/node/subnode" should just be "node/subnode".

Some basic examples of XPath include:

For more examples of XPath, see the MSDN article, XPath Examples.

When using this interface on a newly-created XmlPropertySet, the property set should be cast to the IXmlPropertySet2 interface and the InitGeneric method should be called. See the XmlPropertySet coclass documentation for more information.