-documentTag
Specify an XML tag used to delimit the data for a single document. The default value is "Document".
Syntax
-documentTag
xmltag
Description
We expect that data files will often contain data for multiple documents. There must be an opening and closing pair of tags around each document in the data file. For example, for an xmltag of "Employee", the data file should look like:
<Data> <Employee> ... </Employee> <Employee> ... </Employee> ... </Data>
Note that the root tag name Data is just an example. That tag may have any name. Often we use <XmlData>
. If your data file looked like the above you would specify the Merge command line option:
-documentTag Employee
Our typical, and default, document separator tag is <Document>...</Document>
.
The xmltag can also be a number, usually the value 1 or the value 2. The value 1 tells Merge to use whatever the root tag is as the document tag. Clearly, there could be only one document in such an XML file. A value of 2, tells Merge to use the second tag in the XML file, the one after the root tag, as the document separator tag. For example, the XML file above could be processed by using a command line option of:
-documentTag 2
As Employee is the second tag in, that is equivalent to -documentTag
Employee.