Sybase 2 Barcode Reader User Manual


 
CHAPTER 14 Exporting and Importing XML Data
DataWindow Designer User’s Guide 413
The exported XML can be reimported into the DataWindow columns
dept_id,
emp_id, emp_fname, and emp_lname. Before importing, you must set the
import template on the Data Import page in the Properties view or in code using
the DataWindow object’s Import.XML.UseTemplate property.
The following items are exported, but ignored on import:
The before_detail_marker element is ignored because it is in the header
section.
The first occurrence of the element tag name emp_fname is ignored
because it does not contain a mapping to a DataWindow column name.
If you change the nesting of the emp_fname and emp_lname elements inside
the name element, the import fails because the order of the elements and the
nesting in the XML and the template must match.
Default data import
When there is no import template assigned to a DataWindow object with the
Use Template property, DataWindow Designer attempts to import the data
using the default mechanism described in this section.
Elements that contain
text
The text between the start and end tags for each element can be imported if the
XML document data corresponds to the DataWindow column definition. For
example, this is the case if the XML was exported from DataWindow Designer
using the default XML export template.
The text content of the XML elements must match the column order, column
type, and validation requirements of the DataWindow columns. (The same
restriction applies when you import data from a text file with the
ImportFile
method).
All element text contents are imported in order of occurrence. Any possible
nesting is disregarded. The import process ignores tag names of the elements,
attributes, and any other content of the XML document.
Empty elements
Empty elements (elements that have no content between the start and end tags)
are imported as empty values into the DataWindow column. If the element text
contains only white space, carriage returns, and new line or tab characters, the
element is treated as an empty element.
Any attributes of empty elements are ignored.