Skip to content

How do I convert a Data File into a XML Node structure

This example demonstrates converting a data file into a XML Node structure.

In the solution shown below, the Data File is converted to XML Node Structure using the command "xmlCreateDocumentFromDataFile" command. The attributes of the Data Definition are considered as Keys and the values will be set using data from the Data File.

Solution:

# Command Target Value
To convert a Data File into a XML Node structure
1 xmlCreateDocumentFromDataFile HICC(W) DFConvertedXML

Tips, Tricks, Gotchas & Best Practices:  

  • To convert the DF to XML node structure, The spaces are not allowed in the attribute names in the Data Definition
  • The spaces are not allowed in the Data Definition and Data File Names as well, else the command fails with the error message XML names cannot contain the character " ".
  • As a best practice, it is always advisable to define the variable names without any spaces and if you want to differentiate the words, use underscores.


Feedback and Knowledge Base