SubTree Element

Applies to: SharePoint Server 2010

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

Attributes and Elements

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.

Remarks

The base path must match a single node.

You may specify multiple nested levels of SubTree expressions.

Example

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>

See Also

Concepts

Custom XML Item Processing

XML Mapper Schema (FAST Search Server 2010 for SharePoint)