Greetings all,
I am using Visual Cafe 3.0 and Xerces. I am trying to parse an XML document, but I keep getting a java.lang.ArrayIndexOutOfBoundsException when trying to create a DOMParser. Any one got any ideas?
code snippet:
protected Document createFromString(String xml){
Document doc = null;
try {
StringReader reader = new StringReader(xml);
InputSource source = new InputSource(reader);
DOMParser parser = new DOMParser; ** BLOWS UP HERE ** parser.parse(source); doc = parser.getDocument; } catch(Exception e){ System.out.println("Threw exception parsing incoming xml"); System.out.println(xml); } return doc; }
Any suggestions greatly appreciated.
Before you buy.
I am using Visual Cafe 3.0 and Xerces. I am trying to parse an XML document, but I keep getting a java.lang.ArrayIndexOutOfBoundsException when trying to create a DOMParser. Any one got any ideas?
code snippet:
protected Document createFromString(String xml){
Document doc = null;
try {
StringReader reader = new StringReader(xml);
InputSource source = new InputSource(reader);
DOMParser parser = new DOMParser; ** BLOWS UP HERE ** parser.parse(source); doc = parser.getDocument; } catch(Exception e){ System.out.println("Threw exception parsing incoming xml"); System.out.println(xml); } return doc; }
Any suggestions greatly appreciated.
Before you buy.