Get multiple nodes
Read the text of every element a path such as //order/id finds, as a list and as a table (one row per node, a column per part you name).
Command in the XML toolkit · id ooa.xml/get_nodes · 8 inputs (1 required), 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| XPath | String | Yes | XPath expression. | |
| XML | String | No | XML text (or use path). | |
| Path | File | No | XML file (or use xml). | |
| Attribute | String | No | Return this attribute of each node instead of its text. | |
| Return value | String | No | text | What to return for each node: its text, its XML, or its exact XPath. |
| Namespaces | Dictionary | No | Prefix to namespace URI for prefixes in the XPath, e.g. {"inv": "urn:example:invoice"}; prefixes declared in the document work without this. Map a default namespace (xmlns="...") to a prefix of your choice to address it; a prefix with an empty URI, e.g. {"d": ""}, stands for the document's own default namespace. | |
| Columns | Dictionary | No | Columns of the table output: column name to an XPath read from each matching node (a child, an @attribute, or . for the node's own text). | |
| Session | String | No | Work on the XML of this session (Start session) instead of a file or text; changes stay in the session until End session saves them. |
Outputs
| Output | Type | What it is |
|---|---|---|
| values | List | Texts of matching nodes. |
| count | Number | Number of matches. |
| table | Table | One row per matching node: the columns you named, or value and xpath when none are named. |