XPATH
The XPATH math variable is part of a math syntax that can parse XML by variable name and extract its value into a math variable. It is used in conjunction with a math variable with the XML datatype, which allows OIPA to treat an XML string returned from an external source as an XML object. The XPATH math variable will parse through the stored XML as a source object for the data element name and return the value from the XML.
This math variable is most effectively used in situations where an external call is received by OIPA and provides information that needs to be parsed. It is not recommended for general configuration.
Configuration Considerations
The supported data types for XPATH are DATE, TEXT, INTEGER and DECIMAL. The SOURCE attribute is required and should be a math variable with a data type of XML. Each value that needs to be extracted from the SOURCE math variable will require a separate call to the XPATH math variable.
The CURRENCY data type is not supported with XPATH. To create a math variable with a CURRENCY data type, three steps must performed.
- Extract the numeric value from XML.
- Extract the currency code from XML.
- Use ToCurrency to combine the numeric value and the currency code to create a CURRENCY data type.
Define the XPATH Math Variable
Drag and drop the XPATH math variable from the Palette window onto the Math pane. Enter the following information for the math variable.
-
Type a name in the Name field. This is required. The name will populate the VARIABLENAME attribute of the XML math variable for TYPE=”XPATH".
-
The data types applicable are Date, Text, Integer and Decimal. This is required. The data type will populate the data type attribute of the XML math variable for TYPE=”XPATH”.
-
Make sure variable type is defined as XPATH. This is required.
-
Select Yes or No from Log field. Default is No. This is an optional field.
- Type a default value in the Default field, if needed.
- Click in the XML Source field and press CTRL spacebar to see a list of available XML math variables that can be used as the source.
-
Click in the Value field and type the value you want to assign to the math variable. Value can be literal or it can be the name of a field or math variable.
Check-in the transaction to save the information to the database.
Copyright © 2009, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices