Open topic with navigation

# IncludeRootPath

A Boolean value that specifies whether to include the node specified by DocumentRootPaths in the document. You might set this parameter to `TRUE` if your root node has attributes that you need to include in the document.

For example, consider the following XML:

    <xml>
       <documents>
          <document my_attribute="value">
             <metadata>
               <name>This is the name of the document</name>
               <created>28/02/15 11:01:17</created>
               <modified>28/02/15 15:23:00</modified>
             </metadata>
             <content>Here is some content</content>
           </document>
         </documents>
     </xml>

This can be parsed using the following configuration:

    [XMLParsing]
    DocumentRootPaths=documents/document
    ReferencePaths=metadata/name
    ContentPaths=content

With `IncludeRootPath=FALSE`, CFS produces a document that includes the following fields. The `document` node and `my_attribute` attribute are not included:

    <DOCUMENT>
      <DREREFERENCE>This is the name of the document</DREREFERENCE>
      <metadata>
        <created>28/02/15 11:01:17</created>
        <modified>28/02/15 15:23:00</modified>
      </metadata>
      <DRECONTENT>Here is some content</DRECONTENT>
    </DOCUMENT>

With `IncludeRootPath=TRUE`, CFS produces a document that includes the following fields. The `document` node and `my_attribute` attribute are included:

    <DOCUMENT>
      <DREREFERENCE>This is the name of the document</DREREFERENCE>
      <document my_attribute="value">
        <metadata>
          <created>28/02/15 11:01:17</created>
          <modified>28/02/15 15:23:00</modified>
        </metadata>
      </document>
      <DRECONTENT>Here is some content</DRECONTENT>
    </DOCUMENT>

Type: | Boolean
Default: | False
Required: | No
Configuration Section: | XMLParsing
Example: | `IncludeRootPath=TRUE`
See Also | DocumentRootPaths

© Copyright 2018 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm