Sybase 2 Barcode Reader User Manual


 
Importing XML
416 DataWindow .NET
Example with empty elements
Example 4
This example uses the same DataWindow object, but there are two empty
elements in the XML document. The first has no content, and the second has
an attribute but no content. Both are imported as empty elements.
<?xml version="1.0"?>
<root_element>
<!-- some comment -->
<row_element>
<?process me="no"?>105<name Title="Mr">
<first>Matthew</first>
<!-- another comment -->
<last>Cobb</last>
</name>
<empty></empty>
<birthdate>04/12/1960</birthdate>
</row_element>
<row_element>148<name Title="Ms">
<empty attribute1 = "blue"></empty>
<last>Jordan</last>
</name>
<phone>6175557835</phone>
<birthdate>11/12/1951</birthdate>
</row_element>
</root_element>
Result
The XML document produces this result:
Tracing import
When you import data from XML with or without a template, you can create a
trace log to verify that the import process worked correctly. The trace log
shows whether a template was used and if so which template, and it shows
which elements and rows were imported.
To create a trace log, select the Trace XML Import check box on the Data
Import page in the Properties view and specify the name and location of the log
file in the Trace File Name box. If you do not specify a name for the trace file,
DataWindow Designer generates a trace file with the name pbxmtrc.log in the
current directory.
emp_id emp_fname emp_lname phone birth_date
105 Matthew Cobb 04/12/1960
148 Jordan 6175557835 11/12/1951