Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] nu.xom.ParsingException

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "William Fly" <billfly AT programmer.net>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] nu.xom.ParsingException
  • Date: Mon, 22 Dec 2003 10:03:06 -0600

I am receiving a ParsingException on the following XML file:
<testxml2>
<carrier>"PHILIP"</carrier>
<account>"PHILIP ACCT"</account>
<group>"PHILIP GROUP"</group>
<member>"PHILIP CHIU 02"</member>
<number>"5"</number>
</testxml2>
The exception message is The element type "testxml2" must be terminated by
the matching end-tag "</testxml2>". at line 1, column 11.

using the same Java code which works for the following XML file:
<testxml carrier="PHILIP" account="PHILIP ACCT" group="PHILIP GROUP"
member="PHILIP CHIU 02" number="5"/>

My Java class follows:
class SboXmlReader implements SboReader {
Element root;
Logger sboLog;

SboXmlReader(String req) {
Builder parser = new Builder();
Document doc = null;
sboLog = Logger.getLogger("SboLogger");
sboLog.debug("SboXmlReader called with:" + req);
try {
doc = parser.build(new StringReader(req));
} catch (ParsingException e) {
sboLog.debug("ParsingError in SboXmlReader: " + e.getMessage());
e.printStackTrace();
} catch (IOException e) {
sboLog.debug("IOError in SboXmlReader: " + e.getMessage());
e.printStackTrace();
}
root = doc.getRootElement();

} // SboXmlReader

Why should the attribute-based file work, but not the element-base one?

Thanks,
Bill
ps. I am using v1.0d22. and JDK 1.3.1_06.
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm




  • [XOM-interest] nu.xom.ParsingException, William Fly, 12/22/2003

Archive powered by MHonArc 2.6.24.

Top of Page