ExportToXML actions
ExportToXML library is used to generate the XMl File.
Xml file contains all the dco data such as document,page and field details. To Set the file name use the action XMLSetFileName() and location of the file will be set using XMLSetExportpath() action.
NewNode:
The first xmlNewNode() action in a ruleset will create the root node of the XML file using the new parent NodeID, the child NodeID must be blank.
xmlNewNode("","Batch")
In this example the Batch is the root node of XML File.
xmlNewNode("Page1","Batch")
In this example the "Page1" is child node and "Batch" is the parent node.
SetNodeValue:
For adding the value of the node use XMLSetNodeValue action which having the parameters NodeId and NodeValue
xmlNewNode("","Batch")
xmlNewNode("Page1","Batch")
XMLSetNodeValue("Page1","Mypage");
Setting attribute:
For setting the value of node, the node should be available, otherwise it will return false. Similarly for setting the attribute use XMLSetAttributeValue action which takes parameter as Nodeid, AttrId as attribute id, and AttrValue as Attribute Value.
xmlNewNode("","Batch")
xmlNewNode("Page1","Batch")
XMLSetNodeValue("Page1","Mypage");
XMLSetAttributeValue("Page1","ID","10")
Set Encoding:
XMLSetFileEncodingAsASCII() has an optional parameter to set the UNICODE Encoding format to XML. If this action is not called then by default it takes UTF-8 encoding. This action must be called before XMLSave() action.
XMLSetFileEncodingAsASCII("0")
XMLSave()
Smart Parameters and Common Operations
If an action supports smart parameters, it is specified in the action help. Smart parameters are very powerful specifications for parameters that allow access of data to and from other DCO objects and allow performing special pre-defined operations in one step.
Smart parameters can be used to dynamically obtain or create action input parameters at runtime. For example, an action could be fed the value of a field after recognition, a parameter could pull the value from a DCO variable that was set by a previous action, or a smart parameter could evaluate to the current date, the current time, the current job ID, the current operator ID, the path to the current batch that is running, and more. Smart parameter syntax can also be used to build expressions at runtime that concatenate dynamic data and static data at runtime. Smart parameters are a flexible way to provide a wide range of input to any action that supports smart parameters.
Example: Suppose the BatchID having Value "20190402.000002" . XMLSetFileName("@BatchID") will generate the xmlfile with the name of 20190402.000002 i.e 20190402.000002.xml.