Thread Subject: Error while reading .xml file in Matlab

Subject: Error while reading .xml file in Matlab

From: Milind

Date: 3 Feb, 2010 17:57:22

Message: 1 of 3

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.

Subject: Error while reading .xml file in Matlab

From: Ed Yu

Date: 9 Feb, 2010 21:03:02

Message: 2 of 3

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.

Subject: Error while reading .xml file in Matlab

From: Yair Altman

Date: 10 Feb, 2010 09:37:05

Message: 3 of 3

"Ed Yu" <ekyu88@hotmail.com> wrote in message <hksii6$gc3$1@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

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
error xmlread file Milind 3 Feb, 2010 12:59:09
rssFeed for this Thread

Contact us at files@mathworks.com