Export (0) Print
Expand All

SubTree Element [XML Mapper Schema]

SharePoint 2010

Last modified: June 22, 2010

Applies to: SharePoint Server 2010

  <SubTree base-path='basePath'>  </SubTree>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

base-path

Required. Specifies an XPath base path for the contained SubTree, Mapping, and MappingGroup elements.

Child Elements

Element

Description

Mapping

Maps an XPath expression to a crawled property.

Parent Elements

Element

Description

XMLMappings

Specifies a set of mappings from XPath expressions to crawled properties.

The base path must match a single node.

You may specify multiple nested levels of SubTree expressions.

The first code section provides sample XML input. The second code section provides an associated XML Mapper configuration that uses nested SubTree expressions.

<Document>
  <Metadata>
    <Title>My title</Title>
    <Author>The Author</Author>
    <Keywords>funny, scary</Keywords>
    <UserTags>hilarious</UserTags>
  </Metadata>
</Document>
<SubTree base-path="/Document">
  <SubTree base-path="Metadata">
    <Mapping attr="mytitle" path="Title"/>
    <Mapping attr="myauthor" path="Author"/>
    <MappingGroup attr="mytags" base-path=".">
      <Mapping path="Keywords"/>
      <Mapping path="UserTags"/>
    </MappingGroup>
  </SubTree>
</SubTree>
Show:
© 2015 Microsoft