Namespace Element
Applies to: SharePoint Server 2010
<Namespace name='namespaceName' uri='uriName'/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
name |
Required. A string that specifies the prefix name for the namespace. |
uri |
Required. A URI string that specifies the namespace. |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
Specifies a set of mappings from XPath expressions to crawled properties. |
Example
The following example specifies a default namespace and a custom namespace, and how XML content for both namespaces are mapped. The first code section provides sample XML input. The second code section provides an associated XML Mapper configuration that maps content from the different namespaces to different crawled properties.
<root xmlns="http://somewhere.com/someplace" xmlns:custom="http://somewhere.com/anotherplace">
<child>I'm a child</child>
<custom:anotherchild>I'm a child too</custom:anotherchild>
</root>
<XMLMappings>
<Namespace name="default" uri="http://somewhere.com/someplace"/>
<Namespace name="custom" uri="http://somewhere.com/anotherplace"/>
<Mapping attr="child" path="//default:child"/>
<Mapping attr="anotherchild" path="//custom:anotherchild" />
</XMLMappings>