Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import XML generated with Access2003
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01038055
Message ID:
01038072
Views:
35
Martin,

this command fails:
XMLTOCURSOR('c:\temp\tmpallbillingtypes.xml', 'xml_product')
this is how the xml file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">
<xsd:schema>
<xsd:element name="dataroot">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tmpallbillingtypes" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="generated" type="xsd:dateTime"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="tmpallbillingtypes">
<xsd:annotation>
<xsd:appinfo/>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="c" minOccurs="1" od:jetType="text" od:sqlSType="nvarchar" od:nonNullable="yes">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="5"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="d" minOccurs="1" od:jetType="memo" od:sqlSType="ntext" od:nonNullable="yes">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="536870910"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="q" minOccurs="0" od:jetType="memo" od:sqlSType="ntext">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="536870910"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="cnt" minOccurs="0" od:jetType="decimal" od:sqlSType="decimal">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="10"/>
<xsd:fractionDigits value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<dataroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated="2005-08-03T12:18:58">
<tmpallbillingtypes>
<c>B1</c>
<d>EU Rebate cred note</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>B2</c>
<d>EU Rebate correction</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>B3</c>
<d>Rebate Part Settlmnt</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>B4</c>
<d>Rebate Manual Accrls</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>BK1</c>
<d>Debit Memo Agreemnt</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>BK3</c>
<d>Debit Memo Agreemnt</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>BM1</c>
<d>Debit Memo Agreemnt</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>BM3</c>
<d>Debit Memo Agreemnt</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>BV</c>
<d>Cash Sale</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>CO</c>
<d>Comm.Adjustment (FI)</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>DA</c>
<d>Duty Adjustment (FI)</d>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>F1</c>
<d>EU Invoice</d>
<q>Excluded by billing type</q>
<cnt>1</cnt>
</tmpallbillingtypes>
<tmpallbillingtypes>
<c>F2</c>
<d>EU Invoice</d>
<q>Included by Billing type</q>
<cnt>327</cnt>
</tmpallbillingtypes>
</dataroot>
</root>
Thanks in advance,
Ron
>Hi Ranjan,
>
>Please, can you paste here begin of XML file?
>
>MartinJ
>
>>I need to import data from Access into VFP. Because the Access application is not residing on the network I wanted to use XML to do this.
>>When copying data from VFP to Access I use xml's as well and this works like a charm. However, when doing it the other way around I run into problems.
>>
>>The export in Access2003 has made to include the xsd-scheme inside of the xml. When trying to read the file with xmltocursor:
>>
>>  XMLTOCURSOR('c:\temp\tmpallbillingtypes.xml', 'xml_product')
>>
>>I get the following message:
>>XML parse error: Invalid at the top level of the document.
>>Line 1 position 1. c:\temp\tmpbillingtypes.xml
>>
>>If i try to load the file with a XML adapter:
>>
>>loXMLAdapter = CREATEOBJECT("XMLAdapter")
>>loxmladapter.LoadXML('c:\temp\tmpallbillingtypes.xml')
>>
>>I get the same error.
>>
>>What am i missing here. Why is this so hard (for me) to achieve.
>>I have looked with Google but I have not found the answer yet. What do I need to do so the XML file is accepted by VFP(8)?
>>
>>Thanks in advance,
>>
>>Ron
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform