Message
From
11/06/2017 19:54:24
Antonio Lopes (Online)
BookMARC
Coimbra, Portugal
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01650938
Message ID:
01651913
Views:
109
>Thanks for the help so far. tried a few things but hitting a wall on this.
>I tried the code and it worked if the xml file was a string in the program. I tried the code by copying the contents of the file that I was trying to import and it worked okay. So I then tried pointing to the file directly as this is what I will need to do, but I started getting problems. I've included the code below. When I do the original xml to cursor I get the document header information which I can then validate etc. I then try to use the second half to get the detail lines. This worked if the code referenced the OriginalFile string, however it will not work if I use FileToStr of the xml file or similar variations. The fact that it worked when part of the file but not when passed as a variable has me baffled. Any further help appreciated.
>
>Edit: despite lcXMLFile having data, when I do the command m.XML.loadXML(lcXMLFile) it returns no data.
>

Can you post, as an attachment, a zip of an XML file that fails to be loaded?
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View