Using XML schema

wxdqz

New Member
I have a schema and XML defined as follows.<xml><Schema name="CDISchema" xmlns="urn:schemas-microsoft-com:xml-data"xmlns:dt="urn:schemas-microsoft-com:datatypes"><AttributeType name="customer_num" dt:type="int" /><AttributeType name="contact_id" dt:type="int" /><AttributeType name="cdi_modify_date" dt:type="dateTime" /><ElementType name="row" content="mixed"><attribute type="customer_num"/><attribute type="contact_id"/><attribute type="cdi_modify_date" /></ElementType><ElementType name="data" content="eltOnly"><element type="row" maxOccurs="*" /></ElementType></Schema><data xmlns:s="CDISchema"><s:row customer_num="12345" contact_id="54321" cdi_modify_date="10-10-1950"/><s:row customer_num="54321" contact_id="12345" cdi_modify_date="10-11-1957"/></data></xml>I want to check the data type of the attributes contained in the <row> node,using VB code the following way.XMLDOM.Load "d:\xsl\datamarts\schema.xml"Set oDataNode = XMLDOM.documentElementSet oNodeList = XMLDOM.getElementsByTagName("s:row")Set oNode = oNodeList.nextNodeFor i = 1 To oNodeList.length - 1Debug.Print oNode.Attributes.getNamedItem("customer_num").dataTypeNextBut always I am getting the value for the data type as 'Null' though I havedefined it as 'int' in the schema.Can anyone help me retrieve the data type values from the XML.Thanks,Khan
 
Back
Top