commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mai,Nguyen Huu" <mai...@myvietnam.net>
Subject Re: [configuration]Re: Stranger error when I parse XML file
Date Thu, 27 Nov 2003 23:51:20 GMT
Hi Oliver
I knew the reason why I cannot parse XML file from web container.
Its error from Resin's parser. It has error
so I must use Resin 3.0.4 or use the standard XML parse from JDK.
I fixed this bug already.
Thanks for your comment

----- Original Message -----
From: "Oliver Heger" <Oliver.Heger@t-online.de>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Thursday, November 27, 2003 5:54 PM
Subject: Re: [configuration]Re: Stranger error when I parse XML file


> Okay,
>
> if the XML file is correct, then the only reason I can imagine is that
> there is a problem with the used XML parser. Which XML parser is used
> can depend on the classpath, as long as no specific properties are set.
> This would explain why your code runs from the command line and fails in
> a web container.
>
> There are some possibilities to select a certain parser. A source of
> information can be the API doc of dom4j
> (http://dom4j.org/apidocs/index.html), especially the documentation of
> the SAXReader class. This contains a description of the parser discovery
> mechanisms.
>
> In the FAQ section of the Sun XML page there is also a question that
> deals with using a specific parser
(http://java.sun.com/xml/jaxp/faq.html).
>
> Hope that helps!
> Oli
>
>
> Mai,Nguyen Huu wrote:
>
> >Hi Oliver
> >I made an hard-code of pathname, but it still doesn't work
> >Below is my error log
> >
> >org.dom4j.DocumentException: file:/c:/mvncore.xml:1: XML file has no
> >top-element.  All well-formed XML files have a single top-level element.
> >Nested exception: file:/c:/mvncore.xml:1: XML file has no top-element.
All
> >well-formed XML files have a single top-level element.
> >...
> >
> >Any idea ?
> >Thanks
> >
> >
> >
> >----- Original Message -----
> >From: "Oliver Heger" <Oliver.Heger@t-online.de>
> >To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> >Sent: Wednesday, November 26, 2003 7:46 PM
> >Subject: Re: [configuration]Re: Stranger error when I parse XML file
> >
> >
> >
> >
> >>I don't think this error is related to configuration either, it appears
> >>directly in dom4j when the XML file is loaded. Perhaps you could try to
> >>parse the file with dom4j directly.
> >>
> >>And one other thing: The error message says
> >>"org.dom4j.DocumentException: file:/C:/resin-2.1.9:1". I would expect
> >>that here normally the full path to the parsed file would occur, but
> >>"C:/resin-2.1.9" is obviously no correct file name. Are you really sure
> >>that the path is correct?
> >>
> >>Oli
> >>
> >>Eric Pugh wrote:
> >>
> >>
> >>
> >>>It sounds like xml parser hell!  Try creating the simplest possible
file
> >>>that will run..  You could also try and run the unit tests for
> >>>commons-configuration in your debugger/IDE to see if it is passing in
> >>>something odd...
> >>>
> >>>ERic
> >>>
> >>>
> >>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message