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Â…
_______________________________________________
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.