You are here: Reference > Activity methods > Apply-Parse-XML

  Apply-Parse-XML method

Methods and instructions by function

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

Optional. Enter a value that is the third key part of a Parse XML rule.

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.

Definitions About Parse XML rules

UpMethods and instructions by function