Xerces and Visual Cafe

Status
Not open for further replies.

c0do

Usenet Archive
Joined
Nov 21, 2000
Messages
2
Reaction score
0
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.
 

c0do

Usenet Archive
Joined
Nov 21, 2000
Messages
2
Reaction score
0
Ok, After scouring the Xerces website, I found a FAQ that dealt with this same issue. Their suggestion is:

1. Select the "Options" item in the "Project" menu.
2. Select the "Debugger" tab in the dialog which appears.
3. Select "Exceptions" from the popup menu.
4. Remove the check from the checkbox for
5. java.lang.ArrayIndexOutOfBoundsException

This worked in Visual Cafe's debugger, but if the previous code snippet is put into a applet, it blows up just like in the debugger..

Any suggestions?

Before you buy.
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
548,051
Messages
3,104,251
Members
248,135
Latest member
tobystanx

Latest Threads

Top