xml_NewNode
Creates a child node under the specified parent node, creating the parent node if necessary.
Syntax
bool xml_NewNode (Strparam)
Parameters
Comma-separated String values of:- The NodeID (tag name) of a new child node.
- The NodeID (tag name) of the parent node, if there is a parent.
Smart parameters are supported.
Returns
True, if parent node exists. False, if duplicate root node is declared, or parent NodeID does not exist.Level
All.Details
The new NodeID followed by the parent NodeID creates a new Node in the Export XML file. The action can use Smart Parameters.The first xml_NewNode action in a rule set creates the root node of the XML file using the new child NodeID. The parent NodeID must be blank.
- Example
xml_SetExportPath("C:\ParentDir\APT") ml_SetFileName("@BATCHID") xml_NewNode("B") ml_SetAttributeValue("B,id,@BATCHID")The example starts an export XML file that is named the same as the current batch ID. It has a root node B whose id is assigned the batch ID. It is expected that more rules continue to build the XML structure. The last action that was called must call xml_SaveFile to save the export file to disk.
xml_NewNode("ClaimsData,HCFA")Duplicated NodeIDs cause the previous node of the same ID to commit to its specific parent node and is no longer available for modification. Adding a second child NodeID with the same Tag name of the root node causes the action to return False.