XML command
- Última actualización2023/09/27
XML command
Use the XML command to process XML information that is generated from web services and cloud computing applications.
Overview
The XML command supports sessions, node editing, and Xpath expression execution, based on a tree structure of an XML document. The command enables the automated Task Bot / MetaBot Logic to navigate the tree and make selections based on various criteria.
The XML command enables users to capture data that has XML formatting and save it to a specified location.
To learn more, search for the Automating Structured Data: How to Work with XML Streams and Automating Tasks Using the XML Command courses in Automation Anywhere University: RPA Training and Certification (A-People login required).
- Start XML Session
- Specifies the session name and data source (a file or text).
- End XML Session
- Complements the Start XML Session operation by closing an open XML session.
- Insert Node
- Specifies node name and value. The location of the node is based on the position of the XPath Expression.
- Delete Node/Attribute
- Deletes a node or attribute from the XML file by specifying the XPath Expression.
- Update Nodes
- Updates nodes in a session at the position that is specified for the XPath Expression.
- Validate XML Document
-
Validates session data using XML schema files (.xsd), internal Document Type Definitions (DTDs), or if the session data is Well Formed.
Validation output (VALID or INVALID) can be assigned to a variable. If an error occurs during validation, it is stored in the system variables named: $Error Line Number$ and $Error Description$.
- Get Node(s)
- Retrieves the value(s) of a single or multiple node(s) in the session data by
specifying the XPath Expression.
- Get Single Node: Retrieves the value of a single node or attribute from the session data, at the position specified in the XPath expression. The value is assigned to a variable.
- Get Multiple Nodes: Retrieves values from multiple nodes in the session data, using Text value/XPath expression/Specified attribute name, based on the specified XPath expression.
- Save Session Data
- Session data is an entity used to save session context information. You can save the session to assign the current state of the XML data to a file or a variable.
- Execute XPath Function
- Executes an XPath function and stores the results in a variable.