Error while parsing
hello, i m getting this error while parsing the XML file
i m new to XML in java so anybody plz help me?
here is the small code
DocumentBuilderFactory doc = DocumentBuilderFactory.newInstance();
DocumentBuilder docb = doc.newDocumentBuilder();
BufferedReader file = new BufferedReader(new FileReader("doc.xml"));
Document document = docb.parse(new InputSource(file));
Node domnode= document;
...
it gives error
java.lang.VerifyError: org.apache.crimson.parser.Parser2$DocLocator
void org.apache.crimson.parser.Parser2.<init>()
void org.apache.crimson.parser.XMLReaderImpl.parse(org.xml.sax.InputSource)
org.w3c.dom.Document org.apache.crimson.jaxp.DocumentBuilderImpl.parse(org.xml.sax.InputSource)
void XMLRead.main(java.lang.String[])
thanx
[851 byte] By [
asbee] at [2007-9-27 14:16:16]

You don't have an XML error. Here's what the API documentation says about that error (you could look it up):
'Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.'
It's saying that the class org.apache.crimson.parser.Parser2$DocLocator is fouled up in some way. Hard to say what this means... how did you install the XML classes? As part of a Java 1.4 install or in some other way?
my XML structure is
<?xml version="1.0"?>
<Deceased code="DE">
<Name code="NM" type="text" />
<DeathDate code="DD" type="date" />
<DeathPlace code="DP" type="text" />
<Age code="AG" type="number" />
<BirthDate code="BD" type="date" />
<BirthPlace code="BP" type="text" />
<Residence code="rr" type="number">
<Current code="cr" type="number">
<City code="CC" type="text" />
<State code="CS" type="text" />
<Zip code="CZ" type="number" />
</Current>
<Previous code="pr" type="number">
<City code="PC" type="text" />
<State code="PS" type="text" />
<Zip code="PZ" type="number" />
</Previous>
</Residence>
<DeceasedKey code="K" />
</Deceased>
asbee at 2007-7-5 22:06:04 >
