Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to read a xml file with StringReader class

843834Jan 25 2007 — edited Jan 26 2007
Hi,

I need to read a XML document with StringReade class. My aplication receives an absolute path but this doesn't work:

StringReader oStringReader =
new StringReader(c:\java\libros.xml);

However it works with:

StringReader oStringReader =
new StringReader("<?xml version="1.0" e......");

ie, with the whole document as a String, but I need to do it as the frist way.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2007
Added on Jan 25 2007
3 comments
479 views