XML Integration with ADO and Internet Explorer 5 - The Field Attributes
(Page 5 of 8 )
When you glance back at the XML data, you’ll notice that the field values are represented as attributes. Our schema too must represent those attributes. This in done in two parts. The first is the definition of the
attribute itself, and the second is the definition of the
data type for that particular attribute.
<s:AttributeType name = “emp_id” rs:number= “1” rs:writeunknown = “true”>
The second part is the
AttributeType, which also has a child element to define the data type of the attribute.
<s:datatype dt:type= “string” dt:maxLength = “12” rs:maybenull = “false” />
The above code snippet represents the
string data type, the maximum length of the data to be “12”, and whether the attributes can take in null values.
Sometimes other data types may contain slightly different information. For example:
<s:datatype dt:type= “boolean” dt:maxLength = “2” rs:fixedLength= “true
rs:maybenull = “false” />
The above code also contains additional information to state whether or not the data type contains fixed length data.
Next: The Data Types >>
More XML Articles
More By Gayathri Gokul