Skip to main content

XML

12 commands. Toolkit id ooa.xml.

CommandWhat it does
Convert to dictionaryTurn XML (or the part a path finds) into a Dictionary; attributes become keys starting with @.
Delete nodesRemove 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 XMLYield each node matching an XPath: its text, XML, XPath or an attribute.
End sessionClose an XML session, optionally saving its XML first: over the file it was loaded from, or to another file.
Evaluate XPathWork something out from XML with an XPath function, such as count(//line) or sum(//amount): text, a number or true/false.
Get multiple nodesRead 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 nodeRead the text of the first element a path such as //order/id finds.
Insert nodeAdd an element, with its text and attributes, under, before or after every element a path finds.
Save XML fileCheck that XML text is well written and save it to a file, indented if you want.
Start sessionLoad XML (a file or text) once as a named session, so later steps read and change it and End session saves it.
Update nodeChange the text (or an attribute) of every element a path finds, in a file, in XML text or in a session.
Validate XMLCheck 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.