Skip to main content
LinkedIn
Copied!

Table of Contents

Apply-Parse-XML method

Version:

Only available versions of this content are shown in the dropdown

Use this method in activities to parse an XML document contained in the value of a property and add them to the step page. This method locates and executes a Parse XML rule ( Rule-Parse-XML rule type) and parses the XML document text into values for multiple other properties.

Parameters

The system uses the class of the step page as the Applies To key part of the desired Parse XML rule. (It determines this class from the Pages & Classes information on the Activity form.)

This method has three required parameters:

Parameter Description
NameSpace Enter a value that is the second key part of a Parse XML rule.
ElementName Enter a value that is the third key part of a Parse XML rule.
If left blank, the parsed results will not be formatted correctly.
SourceProperty Identify a property reference that contains a well formed XML document as its value:
  • If the property is on the step page, precede the property name with a period.
  • If this property is on a different page, include the page name in the reference and ensure that this page appears on the Pages & Classes tab of the Activity form.

Results

The system determines the class of the page identified in the Step Page column using the Pages & Classes information for the activity (If the Step Page field is blank, it uses the class that is the Applies To key part of the activity, the class of the primary page). The system assembles the key of a Parse XML rule from that class, the NameSpace parameter, and the ElementName parameter.

Finally, it executes the Parse XML rule in the current context. This parses the input XML document (the value of the property referenced in the SourceProperty parameter) into other property values and adds these to the step page.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us