Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing XML
Message
From
25/01/2007 11:09:32
 
 
To
25/01/2007 09:57:49
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01189130
Message ID:
01189223
Views:
8
Thanks Gregory & Juri. It seems the XML file has a "funny" character at the start of the file, the Load() works fine.

>>Hi,
>>
>>I'm attempting to read in an XML file that is created by Microsoft's SQL Server Reporting Services export to XML function.
>>
>>This code is what I have tried:
>>
>>m.loDom = CREATEOBJECT('MSXML2.DomDocument.4.0')
>>m.loDOM.loadXML(GETFILE("XML"))
>>?m.loDom.xml
>>
>>
>>but I get nothing displayed on the screen. loDom.xml shows up as empty in the debugger too.
>>
>>How do I upload the XML file I am trying to import?
>>
>>Is it that the XML is invalid?
>>
>>FWIW I tried reading it in using the XML Adapter, but got the message that the schema was too complex.
>>
>>If anybody has any ideas how I can take this file and get its data into a VFP cursor, I would appreciate it.
>________________________
>Frank,
>
>Perhaps
>
>obj = CREATEOBJECT('MSXML2.DomDocument.4.0')
>obj.Async = .F.
>
>if( m.obj.Load(GETFILE("XML")) ) && or if(m.obj.LoadXML(FileToStr(GETFILE("XML"))) ) && LoadXml is for strings
>  && successful load
>  ?m.obj.xml
>else
>  && doc load error
>endif
>
>
>Have a look at the java/vb code on this page (ParseError) http://msdn2.microsoft.com/en-us/library/ms756041.aspx
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform