[jdom-interest] Problem to read xml with jdom when CR
Mikael Petterson (KI/EAB)
mikael.petterson at ericsson.com
Mon Apr 24 01:05:52 PDT 2006
Hi,
I read at www.cafeconleche.org (Elliot Rusty's site) the following:
JDOM does not itself include a parser. Instead it depends on a SAX
parser with a custom ContentHandler to parse documents and build JDOM
models from them. Xerces 1.4.4 is bundled with JDOM.
I am using the following in the code:
SAXBuilder builder = new SAXBuilder();
try {
File xmlFile = new File(aFileName);
xmlDoc = builder.build(xmlFile);
} catch (Exception e) {
}
In the APi for JDOM 1.0 I read the following:
public SAXBuilder()
Creates a new SAXBuilder which will attempt to first locate a
parser via JAXP, then will try to use a set of default SAX Drivers. The
underlying parser will not validate.
Is there a way to find the underlying sax parser used?
cheers,
//mikael
________________________________
From: Mattias Jiderhamn [mailto:mj-lists at expertsystems.se]
Sent: den 21 april 2006 17:46
To: Mikael Petterson (KI/EAB); jdom-interest at jdom.org
Subject: Re: [jdom-interest] Problem to read xml with jdom when CR
Please note that the SAXBuilder uses the underlying W3C SAX parser.
Probably the problem lies there.
What SAX parser are you using? Have you tried another SAX parser?
At 2006-04-21 13:56, Mikael Petterson \(KI/EAB\) wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C6653A.9D811623"
Hi,
When we read one version of the xml we had the following:
<class name="Aal0TpVccTp">
<description>From Cello MIM.
Ref. [MOM_Cello]</description>
<systemCreated/>
<attribute name="Aal0TpVccTpId">
<mandatory/>
<noNotification/>
<restricted/>
<dataType>
<string/>
</dataType>
</attribute>
</class>
In the new version of the xml we have the following that jdom
cannot read ( carriage return after MIM):
<class name="Aal0TpVccTp">
<description>From Cello MIM.
Ref. [MOM_Cello]</description>
<systemCreated/>
<attribute name="Aal0TpVccTpId">
<mandatory/>
<noNotification/>
<restricted/>
<dataType>
<string/>
</dataType>
</attribute>
</class>
Any ideas if this is a known problem ? Or if there is a
workaround for it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20060424/7e730396/attachment.htm
More information about the jdom-interest
mailing list