[xsde-users] Would you please have a look at this exception
raferq
raferq at 163.com
Thu Mar 26 03:35:55 EDT 2009
Hello,
I met a problem when I using XSDe parsing following xml document:
<subnet id="98345D87DC77AECB98DF362977">
<sector id=""/>
<sector id="A34131"/>
</subnet>
The schema is defined as:
<xs:complexType name="subnetType">
<xs:sequence>
<xs:element name="sector" type="mi:sectorType" minOccurs="0" maxOccurs="64"/>
</xs:sequence>
<xs:attribute name="id" type="mi:hexBin104Type" use="required"/>
</xs:complexType>
<xs:complexType name="sectorType">
<xs:attribute name="id" type="mi:hexBin24Type" use="required"/>
</xs:complexType>
<xs:simpleType name="hexBin104Type">
<xs:restriction base="xs:hexBinary">
<xs:length value="13" fixed="true"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="hexBin24Type">
<xs:restriction base="xs:hexBinary">
<xs:length value="3" fixed="true"/>
</xs:restriction>
</xs:simpleType>
The issue is that, when sector id is NULL, std::exception was threw out instead of xml::exception I supposed. I can't get any useful infomation from this exception. Seems the XSDe will not check the length of hexBinary I defined in the schema which could be checked in my own code when setting values, my question is how can I check if the hexBinary is NULL before std::exception was threw out?
Thanks so much!
Lei, Qiu
More information about the xsde-users
mailing list