Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLAdapter produces no tables
Message
From
11/10/2007 11:55:45
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
11/10/2007 11:21:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01260315
Message ID:
01260320
Views:
17
>I am trying to read in some XML data which matches a worldwide standard, I have the XSD and IE shows the XML fine.
>
>When I call the .LoadXML() of the XMLAdapter it return .T. suggesting all has been read, but the table count is 0 and I can not see any data.
>
>Any ideas?
>
>
>Regards
>
>
>Gar Williams

I've found that you need to set the schema location before loading the XML, something like:

oxa=createobject("xmladapter")
oxa.XMLSchemaLocation="someXSDfile.xsd"
oxa.LoadXML("someXMLfile.xml")

for liTable = 1 TO oxa.tables.Count
oxa.tables.item(liTable).ToCursor()
endfor

HTH
Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform