Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting started with XML
Message
De
17/12/2011 06:06:42
 
 
À
16/12/2011 11:37:11
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01531198
Message ID:
01531251
Vues:
57
I am making some progress I think.
I have used the microsoft tool xsd.exe against the sample xml file I have been sent and generated an xsd schema file. And then used the following code to generate tables from the xml file:
oXA = CREATEOBJECT("XmlAdapter")
oXA.xmlschemalocation = "c:\temp\sampleorder.xsd"
oXA.RespectNesting = .T.
oXA.LoadXML("C:\temp\sampleorder.xml",.T.)
FOR i=1 TO oXA.Tables.Count
	oXA.Tables(i).Tocursor()
ENDFOR
SET
But it is generating the error: "XML object does not have associated fields"

I am not entirely convinced the sampleorder.xml file I have is correctly formatted. I would be happy to email the file to anyone who thinks they can help if it would help track down the problem.

Any help greatly appreciated.

Barry Sutton.


>I am trying to get to grips with importing XML data into VFP. I have had a dabble with the XMLADAPTER and XMLTOCURSOR but am not quite "getting there".
>
>I have to handle a nested XML file (Order>Items) - one xml file per order. But I do not have a Schema. How do I go about importing the xml file without a Schema? Or is there a way I can build a standalone schema and then use this against the xml files I am being sent?
>
>I would be happy to email the sample xml file I have been sent if it would help as there are a couple of aspects about the hierarchy of it which I do not fully understand in any case.
>
>Sorry to be so dim on this - any help grately appreciated.
>
>Barry Sutton
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform