Alan, What you need is some of that left over LSD.... Now if I can only remember where I put it! <BG>
Seriously I'll be interested in the answer to this as it may well affect something I've got to embark upon next week. Thanks for finding out about it before I do! Dave Crozier "A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match" - Bill Bryson -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Bourke Sent: 12 June 2006 12:06 To: [email protected] Subject: VFP8/9 XMLAdapter falling over on LoadXML method. Simple program, the PRG, XML and XSD are all in the same folder: CLOSE ALL CLEAR ALL RELEASE ALL oXMLAdapter = NEWOBJECT('XMLAdapter') oXMLAdapter.XMLSchemaLocation = "kev.xsd" oXMLadapter.LoadXML("kev.xml", .T.) The LoadXML() call is falling over with: "XML Parse Error: Switch from current encoding to specified encoding not supported." XMLToCursor generates a cursor, but just has one record with a memo file and everything dumped into it. There is no encoding specified in the file, the header line is just: <?xml version="1.0" ?> Had a Google, found that this error can happen if the file has a Byte Order Mark which identifies it as one code page, yet the XML declaration specifies another. However on looking at the file with a hex editor I see that the first byte is 3C, which as far as I can ascertain means UTF-8. I can import it into a DataSet in .NET no problem. That DataSet has multiple DataTables in it. So, VFP XML gurus ... is this just a non-runner in VFP without rolling my own XML/XSD parser? Further note: The XML has an inline XSD specified. Either using that, or downloading the XSD and specifying it with XMLSchemaLocation as per the code above, I get the same error. The XSD file appears to have a UTF-8 encoding also. -- Alan Bourke [EMAIL PROTECTED] -- http://www.fastmail.fm - And now for something completely different… [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

