You are here: Reference > Rule types > Parse XMLs > Parse XML form - Completing the Mapping tab

Parse XML form
Completing the Mapping tab

  1. About 
  2. New 
  3. Mapping 
  4. Pages &Classes 
  5. XML 
  6. History 
  7. More... 

Use the Mapping tab to define Parse XML rules using a graphical tree control. The tree structure allows you to define how the parsed XML data will be mapped to the clipboard values referenced in the individual tree nodes.

In the tree structure, element marks an element, marks a repeating element, and marks an attribute.

Field

Description

Allow tree editing?

Enables the XML data to be edited using the tree control.

Add Attribute Add an attribute to the selected element.
Add Element Add a child element to the selected element.
Delete Delete an element or attribute and all of its child elements or attributes.

Double-click a tree node to display the User Data panel for the node.

User Data panel — Basics

Field

Description

Node Name

Enter the attribute or element name that the generated parsing code will search for. You may set this value to _any_ to indicate that the generated parsing code is to search for any attribute or element node at this location in the tree.

Node Type

Specify if the selected node is an Element or Attribute.

User Data panel — Mapping tab

Field

Description

Mapping Mode

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.

Context Page

Specify a page listed on the Pages & Classes tab to be used as the target for parsed XML data values. You may 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.

Override Class

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.

Context Class

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’s parent. The context class of the root node is the class that the parse rule applies to.

Property

Used only for Standard and Literal XML mapping modes. Specify to map the character data of the XML node to.

You may specify a Single Value, Value List, or Value Group property. 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.

Group Subscript Select this check box if you want to use the Property as the group subscript value.
Namespace

Used only for the Apply Rule mapping mode. Specify the Namespace key part of the parse rule that will be called to parse the element content. This may be different from the Node Namespace value.

Element Name

Used only for the Apply Rule mapping mode. Specify the Element Name key part of the parse rule that will be called to parse the element content. This may be different from the Node Name value.

User Data panel — Node tab

Field

Description

Node Namespace

This option is typically set when the parse rule is auto-generated from an XML Schema Definition (XSD).

If the option is set, the attribute or element name must be prefix-qualified with the specified namespace value for its value to be parsed and mapped to the clipboard.

Optional

This option is typically set when the parse rule is auto-generated from an XML Schema Definition, and has no effect on parsing.

Repeating

Select to indicate that the element may appear more than once at this position in the XML data stream. If checked, provide a Page List or Page Group property reference in the Context Page field, or a Value List or Value Group reference in the Property field to map the XML content to repeating clipboard data values.

Nillable

This option is typically set when the parse rule is auto-generated from an XML Schema Definition, and has no effect on parsing.

Substitution

Indicates whether this element or its content can be substituted at run time using a different element or complex type definition. This option, as well as the content of the Type Substitution and Element Substitution tables on the XML tab of the parse rule, is typically set when the parse rule is auto-generated from an XML Schema Definition.

By using the Apply Rule mapping mode, the actual component parse rule instance that is applied to parse the element content can be determined dynamically at run time by matching the type or element name from the inbound XML document with an entry in either the Type Substitution or Element Substitution table. If found, the Class name specified in the third column of the table will be used to select the most appropriate Parse XML rule to process the element content.

Note: If you configure Type Substitution on the root node of the Parse XML rule, you must specify a Context Page on the Mapping tab of the User Data panel.

User Data panel — Type tab

Field

Description

XSD Base Type

This option is typically set automatically when the parse rule is auto-generated from an XML Schema Definition.

Note: XSD date, dateTime, and time values use a special formatting that is distinct from Pega Date, DateTime, and TimeOfDay property value formatting. For these XSD types, if you are parsing a DateTime field, you should specify "DateTime" in this field for the property to parse correctly. The value specified in this field informs the parse rule to convert the value to the Pega format before mapping it to the clipboard.

Type Name

This option is typically set when the parse rule is auto-generated from an XML Schema definition, and has no effect on parsing.

Type Namespace

This option is typically set when the parse rule is auto-generated from an XML Schema definition, and has no effect on parsing.

Default Value

This option is typically set when the parse rule is auto-generated from an XML Schema definition, and has no effect on parsing.

Is SOAP array

This option is typically set when the parse rule is auto-generated from an XML Schema Definition, and has no effect on parsing.

Parser Steps (Deprecated)

These fields are deprecated. For an explanation of these fields, see Parse XML form — Completing the Mapping tab (Version 5.4 fields).

Parse Type (Deprecated)

This field is deprecated. For an explanation of these fields, see Parse XML form — Completing the Mapping tab (Version 5.4 fields).