Skip to Main Content

Java Programming

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!

XML Document Builder question. Parsing a Input source

807603Jan 14 2008 — edited Jan 26 2008
Hi ,

I m trying to make a function which will take string as a parameter do something like this:

DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
StringReader reader = new StringReader( is );
InputSource inputSource = new InputSource( reader );
Document doc = docBuilder.parse(inputSource);

After this I use it to get my nodesets and some operations. I think I am getting Fatal exception.

Can anyone help me ??


Some how the problem boils down to converting a sting to a Input Source.



Thanks a lot
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2008
Added on Jan 14 2008
8 comments
1,040 views