>>>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?
>
>I think the Load() method has to be used when loading a file
>
>LoadXml() is for strings I believe
Yes, Mark already tried to FILETOSTRing the document before loadXMLing it, but it fails, nonetheless, so I suspect that there is a problem with the file to be consumed this way, probably a BOM.
----------------------------------
António Tavares Lopes