[xsde-users] xml parser error
Jerry Yin
jerry.yin at yahoo.com
Mon Jun 8 17:04:46 EDT 2009
Hi Experts,
I am new to this group. I tried to create a test hybrid/parser program using following schema. I could verfy the schema is correct using the Liquid XML studio. But when parser the idel.xml, I couldn't get the correct vaule. Could someone help me? If I parse the idel.xml, I even got a parser error at (4,34), which is the ></dialog-info>
thanks,
Jerry
schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace="urn:ietf:params:xml:ns:dialog-info"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:ietf:params:xml:ns:dialog-info"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- This import brings in the XML language attribute xml:lang-->
<xs:complexType name="dialog-info">
<xs:attribute name="version" type="xs:nonNegativeInteger"
use="required"/>
<xs:attribute name="State" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="full"/>
<xs:enumeration value="partial"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="entity" type="xs:anyURI"
use="required"/>
</xs:complexType>
<xs:element name="dialog-info" type="tns:dialog-info" />
</xs:schema>
idle.xml
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="0" State="full"
entity="sip:alice at example.com"/>
idel1.xml
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="0" State="full"
entity="sip:alice at example.com"></dialog-info>
__________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
More information about the xsde-users
mailing list