Mapping XML attributes and elements in a Parse XML rule
Parse XML rules allow you to map both element and attribute nodes to clipboard pages. If your node type is Attribute, map the attributes in your XML to properties in Pega Platform.
- In the navigation pane of Dev Studio, click Records.
- Expand the Integration-Mapping category, and then click Parse XML.
- Click the row of a Parse XML rule to open it.
- On the Mapping tab, double-click a tree node to display the User Data window for the node.
- In the User Data window, in the Node Name field, enter a name that describes the node.
- In the Node Type field, select Attribute or Element.
- On the Mapping tab, complete the fields based on your
node type.
Node type Actions Attribute - In the Context Page field, specify a
page listed on the Pages &
Classes tab to be used as the target for
parsed XML data values.You can also specify an embedded Page, Page List, or Page Group property of the node’s context class. Use a Page List or Page Group property for mapping when the Repeating flag is set on the Node tab of the User Data panel. If a Page Group property is used, the name of the parsed attribute or element is used as the group subscript value. This is useful when _any_ is specified as the Node Name value.
- In the Override Class field, if
Context Page is set to a Page, Page List, or Page Group
property, specify the concrete class that will be used when
mapping the XML to the embedded page.
- In the Property field, specify a
Single Value, Value List, or Value Group property to map the
character data of the XML node. If a Value Group property is used, the name of the parsed attribute or element is used as the group subscript value. This is useful when _any_ is specified as the Node Name value. This field only applies to Standard and Literal XML mapping modes.
- To specify if you want to use the property in step c as the group subscript value, select Group Subscript.
Element - Choose the method used to map XML elements to
properties:
- Standard – Parse and extract data from the inbound XML based on the values listed in the selected node and any of its child nodes.
- Literal XML – Insert the literal content of the Source Property into the XML stream instead of auto-generating XML content for the selected element.
- Apply Rule – Invoke a component Parse XML rule to parse the content of the selected element node.
- In the Context Page field, specify a
page listed on the Pages &
Classes tab to be used as the target for
parsed XML data values.You can also specify an embedded Page, Page List, or Page Group property of the node’s context class. Use a Page List or Page Group property for mapping when the Repeating flag is set on the Node tab of the User Data panel. If a Page Group property is used, the name of the parsed attribute or element is used as the group subscript value. This is useful when _any_ is specified as the Node Name value.
- In the Override Class field, if
Context Page is set to a Page, Page List, or Page Group
property, specify the concrete class that will be used when
mapping XML to the embedded page.
- In the Property field, specify a
Single Value, Value List, or Value Group property to map the
character data of the XML node. If a Value Group property is used, the name of the parsed attribute or element is used as the group subscript value. This is useful when _any_ is specified as the Node Name value. This field only applies to the Standard and Literal XML mapping modes.
- To specify if you want to use the property in step d as the group subscript value, select Group Subscript.
- In the Namespace field, specify the
Namespace key part of the parse rule that will be called to
parse the element content. This might be different from the
Node Name value.This field only applies to the Apply Rule mapping mode.
- In the Element Name field, specify
the Element Name key part of the parse rule that will be
called to parse the element content. This might be different
from the Node Name value.This field only applies to the Apply Rule mapping mode.
- In the Context Page field, specify a
page listed on the Pages &
Classes tab to be used as the target for
parsed XML data values.
- Click OK to close the User Data
window, or click the Node tab to continue configuring the
node.For more information, see Configuring XML tree node properties for a Parse XML rule.
Previous topic Defining the mapping for a Parse XML rule Next topic Configuring XML tree node properties for a Parse XML rule