XML Query All
XML Query All
Section titled “XML Query All”Type: xml-query-all · Package: XML Activities v1.0.0 · Output: List
Evaluates an XPath expression and returns all matching values, as a list. Use it when the XML has several repeated elements (invoice lines, benefits, items) and you want to go through them all.
How it works
Section titled “How it works”Applies the xpath to the xml and returns the text list of all matching elements. See XPath.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
xml | expression | The XML text (from Read XML). |
xpath | expression | The XPath expression, e.g. //Prestacion/Codigo. |
Optional parameters
Section titled “Optional parameters”Ninguno.
Output
Section titled “Output”Returns a List with all matching values.
Example
Section titled “Example”Read XML path = = ruta → output: xmlXML Query All xml = = xml xpath = "//Prestacion/Codigo" → output: codigosLog message = = "Prestaciones: " + count(codigos)For Each items = = codigos itemVariable = codigo └─ activities: ... procesar cada código ...Related activities
Section titled “Related activities”- XML Query Text — only the first value.
- For Each — scroll through the results.