XML Parser Processing
Last modified: October 05, 2009
Applies to: SharePoint Foundation 2010
When a user uploads an XML document, SharePoint Foundation examines the document to determine if the built-in XML parser should be invoked. If the document meets the requirements, SharePoint Foundation invokes the parser to promote the appropriate document properties to the document library.
For more information about the requirements for SharePoint Foundation invoking the built-in XML parser for a document, see XML Document Property Promotion and Demotion.
After the XML parser is invoked, it examines the document to determine the document content type, and then accesses the document's content type definition. The content type definition includes information about each column in that content type; this information can include the following:
The document property that maps to a given column, if one exists
The location where the document property is stored in the document itself
For more information about specifying this information in the content type definition, see Using Content Types to Specify XML Document Properties.
Using this information, the XML parser can extract each document property from the correct location in the document, and pass these properties to SharePoint Foundation. SharePoint Foundation then promotes the appropriate document property to the matching column included in the content type.
Likewise, SharePoint Foundation can also invoke the built-in XML parser to demote properties from the content type columns, on the document library, into the document itself. When SharePoint Foundation invokes the demotion function of the parser, it passes to the parser the document and the column values to be demoted into the document. Once again, the parser accesses the document's content type definition. The parser uses the content type definition to determine the following:
Which document properties map to the column values passed to it for demotion
The location of those document properties in the document
Using this information, the parser writes the column values into the applicable document property locations in the document.