Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Excerpt | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
OverviewImage Modified Use an
Basic Settings
|
Excerpt | ||
---|---|---|
| ||
| ||
Expression | Description | |
| symbol refers to the root element. | |
@ | symbol refers to the current element. | |
. | is the dot-child operator, which is used to denote a child element of the current element. | |
[ ] | is used to select a child element of the current element (by name or index number). | |
* | a wildcard, returning all elements regardless of their name. | |
^ | symbol is used to traverse up 1 element in the hierarchy from child to parent. |
Output Attributes
Contains a list of attributes returned by the node. In this node XML is converted into data objects that can be used by PhixFlow, this information is accessed using the syntax_result.
AttributeName
in an output attribute. To add an output attribute click the Image Removed
Namespaces
The grid contains a list of the namespaces defined in an XML response.
To add a namespace to the list, click Image Removed Create New. PhixFlow opens a new XML Namespace property pane.
To remove a namespace, use the Image Removed Delete in the toolbar.
Advanced
Prioritise Throughput Over Ordering
Worked Example
Code Block | ||
---|---|---|
| ||
<root xmlns:h="http://example.com/schema">
<main page="PF Main Page">
<h:title name="PF Title">PF Title Text">
<h:datarow>
<h:data h:initials="AA">Alistair Andrews<data>
<h:data h:initials="BB">Bert Brown</data>
</h:datarow>
</h:title>
</main>
</root>
|
The following examples show how to reference the returned xpaths xml data structure in an Output Attribute:
- Xpath value: _result → returns 'PF Title Text'
- Xpath element attributes: _result.name → returns 'PF Title'
- Xpath parent attributes: _result.^.page -> returns 'PF Main Page'
- Xpath child attributes: listToString(_result.datarow.data.initials) → returns 'AA,BB'
- Xpath child attribute text values: listToString(_result.datarow.data) → returns 'Alistair Andrews,Bert Brown'
Note the use of
^
to traverse to the immediate parent element.- . to traverse to the immediate child element.
the
listToString
function to handle multiple matching child elements/attributes.
Namespaces
XML documents containing namespaces are supported.
Within path expressions they are referred to using semicolons.
- /root/main/h:title
Within attribute expressions a $ is used instead of the normal : namespace notation
- Xpath element attibutes: _result.h$name → returns 'PF Title'
- Xpath child attributes: listToString(_result.h$datarow.h$data.h$initials) → returns 'AA,BB'
- Xpath child attribute text values: listToString(_result.h$datarow.h$data.value) -> returns 'Alistair Andrews,Bert Brown'
h
' must be configured in the XML Namespace.Learn More
For links to all pages in this topic, see Understanding Actionflows.