XML Document Property Promotion and Demotion
Published: May 2010
Microsoft SharePoint Foundation 2010 includes a built-in XML document parser you can use to promote and demote the properties included in your XML documents. Your XML files can adhere to any schema you choose. As long as your XML file meets the following requirements, SharePoint Foundation automatically invokes the built-in XML parser whenever document property promotion or demotion is required.
Property promotion refers to extracting document properties from a document and writing those property values to the appropriate columns on the document library where the document is stored. Property demotion refers to taking column values from the document library where a document is stored, and writing those column values into the document itself.
Using the built-in XML parser for your custom XML files helps to ensure that your document metadata is always current and synchronized between the document library and the document itself. Users can edit document properties in the document itself, and have the property values on the document library automatically updated to reflect their changes. Likewise, users can update property values at the document library level, and have those changes written back into the document itself automatically.
Before SharePoint Foundation can invoke the built-in XML parser for an XML file, that XML file must meet the following requirements:
The file must have an extension of .xml.
The file must not be a WordProcessingML file. SharePoint Foundation contains a separate built-in parser for WordProcessingML files; SharePoint Foundation automatically invokes this parser for XML files created using WordProcessingML.
Additionally, for the XML parser to actually promote and demote document properties, the XML file should be assigned a content type that specifies where each document property is located in the document, and which content type column that property maps to.
For more information about specifying a content type for an XML document, see Specifying Document Content Type for XML Parsing.
For more information about specifying where a document property is located in an XML document, see Using Content Types to Specify XML Document Properties.
SharePoint Foundation invokes only the built-in XML parser for files with an .xml file extension. You cannot specify a custom parser for XML files with an .xml file extension.