Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error loading xml
Message
From
19/10/2006 11:00:47
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01163137
Message ID:
01163319
Views:
8
Thanks Borislav. That fixed it.

>Remove and from schema:
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><xsd:schema id="VFPDataSet" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
><xsd:element name="VFPDataSet" msdata:IsDataSet="true">
><xsd:complexType>
><xsd:choice maxOccurs="unbounded">
><xsd:element name="cr_sortdesc" minOccurs="0" maxOccurs="unbounded">
><xsd:complexType>
><xsd:sequence>
><xsd:element name="colnum">
><xsd:simpleType>
><xsd:restriction base="xsd:decimal">
><xsd:totalDigits value="5"/>
><xsd:fractionDigits value="0"/>
></xsd:restriction>
></xsd:simpleType>
></xsd:element>
><xsd:element name="sortcode">
><xsd:simpleType>
><xsd:restriction base="xsd:string">
><xsd:maxLength value="1"/>
></xsd:restriction>
></xsd:simpleType>
></xsd:element>
><xsd:element name="descrp">
><xsd:simpleType>
><xsd:restriction base="xsd:string">
><xsd:maxLength value="10"/>
></xsd:restriction>
></xsd:simpleType>
></xsd:element>
></xsd:sequence>
></xsd:complexType>
></xsd:element>
></xsd:choice>
><xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
></xsd:complexType>
></xsd:element>
></xsd:schema>
>
>
>
>
>>Hi All
>>
>>I am getting an error using xlmadapter when loading the xml.
>>Here is the error: Any help would be appreciated.
>>
>>* this is how I am loading the xml.
>>this.loadxml(tcXml)
>>
>>XML Error: XML Parse error: The element 'VFPDataSet' is used but not declared in the DTD/Schema.
>> Line 2, Position 131.   <VFPDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xsi:noNamespaceSchemaLocation="d:\projects\yak\cr_sortdesc.xsd">
>>
>>
>>I have the XMLSchemaLocation set to "cr_sortdesc.xsd"
>>
>>Here is the xsd:
>>
>>
>><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
>><VFPDataSet>
>><xsd:schema id="VFPDataSet" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
>><xsd:element name="VFPDataSet" msdata:IsDataSet="true">
>><xsd:complexType>
>><xsd:choice maxOccurs="unbounded">
>><xsd:element name="cr_sortdesc" minOccurs="0" maxOccurs="unbounded">
>><xsd:complexType>
>><xsd:sequence>
>><xsd:element name="colnum">
>><xsd:simpleType>
>><xsd:restriction base="xsd:decimal">
>><xsd:totalDigits value="5"/>
>><xsd:fractionDigits value="0"/>
>></xsd:restriction>
>></xsd:simpleType>
>></xsd:element>
>><xsd:element name="sortcode">
>><xsd:simpleType>
>><xsd:restriction base="xsd:string">
>><xsd:maxLength value="1"/>
>></xsd:restriction>
>></xsd:simpleType>
>></xsd:element>
>><xsd:element name="descrp">
>><xsd:simpleType>
>><xsd:restriction base="xsd:string">
>><xsd:maxLength value="10"/>
>></xsd:restriction>
>></xsd:simpleType>
>></xsd:element>
>></xsd:sequence>
>></xsd:complexType>
>></xsd:element>
>></xsd:choice>
>><xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
>></xsd:complexType>
>></xsd:element>
>></xsd:schema>
>></VFPDataSet>
>>
>>
>>And Here is the xml
>>
>>
>><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
>><VFPDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="d:\projects\yak\cr_sortdesc.xsd">
>>	<cr_sortdesc>
>>		<colnum>1</colnum>
>>		<sortcode>s</sortcode>
>>		<descrp>tes 1</descrp>
>>	</cr_sortdesc>
>>	<cr_sortdesc>
>>		<colnum>2</colnum>
>>		<sortcode>w</sortcode>
>>		<descrp>test1</descrp>
>>	</cr_sortdesc>
>>	<cr_sortdesc>
>>		<colnum>3</colnum>
>>		<sortcode>w</sortcode>
>>		<descrp>test w</descrp>
>>	</cr_sortdesc>
>></VFPDataSet>
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform