XML Document Builder question. Parsing a Input source
807603Jan 14 2008 — edited Jan 26 2008Hi ,
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