From: Milind on
I'm trying to read .xml file in Matlab, using:

data = xmlread('data.xml');

but I'm following error:

[Fatal Error] GEecg.xml:1:44: Invalid encoding name "ISO8859-1".

??? Java exception occurred:
org.xml.sax.SAXParseException: Invalid encoding name "ISO8859-1".

at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235)

at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)

at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)


Error in ==> xmlread at 98
parseResult = p.parse(fileName);

Why is it giving an error related to java exception, while I'm trying to read a .xml file. and how can I read this file using Matlab.
Thank you.
From: Ed Yu on
It has to do with what Java expects when reading an ASCII file. Try to specify the proper encoding with -Dfile.encoding=.... within the java.opts file. It might do the trick. Good luck!

Ed.
From: Yair Altman on
"Ed Yu" <ekyu88(a)hotmail.com> wrote in message <hksii6$gc3$1(a)fred.mathworks.com>...
> It has to do with what Java expects when reading an ASCII file. Try to specify the proper encoding with -Dfile.encoding=.... within the java.opts file. It might do the trick. Good luck!
>
> Ed.


ISO8859-1 is an invalid encoding name - should be ISO-8859-1 (note the extra dash)

Yair Altman
http://UndocumentedMatlab.com