Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Mapping XML elements to properties

Updated on April 6, 2022

If your node type is Element, map the elements in your XML to properties in Pega Platform.

  1. On the Mapping tab of the User Data window, 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 – Convert the XML content of an element, including its tag, attributes, character data, and/or child element content to a string and then set it as the value of the specified Property.
    • Apply Rule – Invoke a component Parse XML rule to parse the content of the selected element node.
      Note: You must define the component parse rule on the Context class of the node from which it is referenced.
  2. 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.
  3. 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.
  4. In the Context Class field, Read-only. Lists the class of the page or property on the Context Page field. If a context page is not specified on the selected node, the value defaults to the context class of the selected node parent. The context class of the root node is the class that the parse rule applies to.
  5. 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.
  6. To specify if you want to use the property in step 5 as the group subscript value, select Group Subscript.
  7. 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.
  8. 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.
  9. Click OK to close the User Data window, or click the Node tab to continue configuring the node.
  • Previous topic Mapping XML attributes in a Parse XML rule
  • Next topic Configuring XML tree node properties for a Parse XML rule

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us