|
|
XPath
Description
Evaluates an XPath expression against an XML element and returns the resultant string value.
Arguments
1.XPath- Name of the Macro.
2.Expression- The XPath expression
3.XML - The XML to evaluate the XPath expression against.
Examples
[XPath|@Description]
Copies a value from an attribute named Description from the context element if it exists or returns an empty string.
[XPath|Amounts/Base]
Copies a value from an element named Base that is contained in another element named Amount from the context element if it exists or returns an empty string.
[XPath|../../Connections/Connection[@TransferScope="Source"]/@Culture]
Navigates two levels up the XML tree from the context element and then down two levels through a collection of Connection elements where it can then select a specific Connection based on the value of the @TransferScope attribute and then return the Culture attribute from that element.
[XPath|CompanyName|<CompanyDetail><CompanyName>pasUNITY</CompanyName></CompanyDetail>]
Copies a value from an element named CompanyName from the provided CompanyDetail XML.
Returns "pasUNITY".
Notes
This is a contextual macro and is used during the import operation of data from a source connection for those connections that read data from the source in record format using data readers. XPath syntax is widely documented on the Internet.
Copyright © 2025 pasUNITY, Inc.
Send comments on this topic.