XML
12 commands. Toolkit id ooa.xml.
| Command | What it does |
|---|---|
| Convert to dictionary | Turn XML (or the part a path finds) into a Dictionary; attributes become keys starting with @. |
| Delete nodes | Remove every element (or one attribute of each) that a path such as //order/note finds, in a file, in XML text or in a session. |
| Each node in XML | Yield each node matching an XPath: its text, XML, XPath or an attribute. |
| End session | Close an XML session, optionally saving its XML first: over the file it was loaded from, or to another file. |
| Evaluate XPath | Work something out from XML with an XPath function, such as count(//line) or sum(//amount): text, a number or true/false. |
| 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). |
| Get single node | Read the text of the first element a path such as //order/id finds. |
| Insert node | Add an element, with its text and attributes, under, before or after every element a path finds. |
| Save XML file | Check that XML text is well written and save it to a file, indented if you want. |
| Start session | Load XML (a file or text) once as a named session, so later steps read and change it and End session saves it. |
| Update node | Change the text (or an attribute) of every element a path finds, in a file, in XML text or in a session. |
| Validate XML | Check that XML is well written and, if you give them, that it follows one or more XSD schemas or its DTD; gives the result instead of failing. |