Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with XMLAdapter
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01131713
Message ID:
01131770
Views:
16
Thank you very much. Now the XML starts to load and I am using the more complex version of the XML file. This file is what we are downloading from a store site that we have no control over. The XML is pointing to an XSD file located at the store site. The error I am getting is

XML Error: XML Parse error: The element 'export_pos_response' is used but not declared in the DTD/Schema.
Line 2, Position 193

Line 2 in the XML looks like this
<export_pos_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://xxx.xxxxxxxxxxxxx.xxx/xxxxxx/xxx/export_pos_response.xsd" schemaVersion="4.3">
I tried setting the .LoadXML 3rd parameter to .F. but that returned an even more cryptic error message.

Any more ideas?

Thanks

>You have to pass .T. as the second parameter for a file
>.LoadXML('export_pos_response-test.xml', .T.)
>
>
>
>>I am having a problem with loading ANY XML file using the XMLAdapter. I have MSXML 4.0 SP2 installed and using VFP 9 SP1. Here is the very simple code.
>
>>loXMLAdapter = CREATEOBJECT('XMLAdapter')
>>WITH m.loXMLAdapter
>>	.UTF8Encoded = .T.
>>	.RespectNesting = .T.
>>	.LoadXML('export_pos_response-test.xml')
>>ENDWITH
>
>>Here is what I thing is a very simple XML file
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
>>    <purchaseOrder purchaseOrderNumber="407446" purchaseOrderId="31">
>>      <description>None</description>
>>      <status>Shipped</status>
>>      <confirmationNumber>SQ# 0 1887045</confirmationNumber>
>>      <endUserPONumber>internal</endUserPONumber>
>>      <deleted>false</deleted>
>>      <autofulfill>true</autofulfill>
>>      <dropship>true</dropship>
>>      <blindPackaging>true</blindPackaging>
>>      <shipComplete>false</shipComplete>
>>      <allowBackorder>false</allowBackorder>
>>    </purchaseOrder>
>>
>>
>>When it executes the .LoadXML method I get
>>
>>XML Error: XML Parse error: Invalid at the top level of the document.
>>Line 1, Position 1, export_pos_response-test.xml
>>
>>This is driving me nuts since it should be SIMPLE! Well, thats my thought.
>>
>>Any help, clues, etc would be appreciated.
>>
>>Thanks
John Gundrum
Canon Technology Solutions Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform