commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Fortner" <phidia...@gmail.com>
Subject Re: Commons Configuratio - CDATA in XML
Date Wed, 10 Dec 2008 21:49:50 GMT
I can't tell without looking at the file, but my guess is that you have a
character in your XML that is not UTF-8.  The encoding at the top of the
file probably specifies UTF-8 as the encoding.  If you can replace the
character you should be OK.  JEdit or Eclipse should be able to point out
the offending character.  Regardless of whether the CDATA exists, most
parsers will check to see if you're using the right encoding.

Hope this helps,

Mark

On Wed, Dec 10, 2008 at 1:42 PM, Brian Boyle <bboyle18@gmail.com> wrote:

> Hi,
>
> I am loading up a XML file into and XMLConfiguration object but I am
> getting
> an error.
>
> org.apache.commons.configuration.ConfigurationException: Invalid byte 1 of
> 1-byte UTF-8 sequence.
>
> It appears the my XML is failing to be parsed correctly because I have an
> apostrophe in it. However, I have wrapped my XML values in CDATA so this
> should normally prevent this from happening. Does Commons Configuration
> support parsing XML tags with CDATA in them?
> Here is a sample of what my XML is like
>
> <description><![CDATA[doesn't seem to work]]></description>
>
> Thanks
>
> Brian
>
> --
> Brian Boyle
> Mobile: 087 418 5215
> Email: bboyle18@gmail.com
>



-- 
Mark Fortner

blog: http://feeds.feedburner.com/jroller/ideafactory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message