parsing xml using iso-8859-15

Christophe Couronne <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Hi gobo users, 

I'm looking for an xml parser able to parse an iso-8859-15 encoded xml
files. This encoding is very similar to the iso-8859-1, also known as
latin-1, but provides some features useful to type french texts. I've tried
to use the gobo XM_EIFFEL_PARSER. The print example fails as below : 

xof@brasserie:/home/xof/print$ cat remote.xml 
<?xml version="1.0" encoding="iso-8859-15" ?>
<!DOCTYPE board PUBLIC "CO1N
CO1N !" "http://phplop.tuxfamily.org/dtd/tribune-1.0.dtd">
<board site="localhost">

        <post time="20061101114430" id="67035">
                <info>wmCoinCoin/2.5.1e-1 (palmipede; Linux 2.6.18-1-686
i686)</info>
                <message>taiste </message>
                <login>xof</login>
        </post>

</board>
xof@brasserie:/home/xof/print$ ./print remote.xml 
Defaulting to eiffel parser
parsing data...
/home/xof/print/remote?xml:1:44:unsupported character encoding
exiting...

This example uses only common characters from both latin-1 and latin-9
encoding, but some may be differents, such as œ (oe) Œ (OE) Åž (upper ÿ) or
€ (euro). If I change the iso-8859-15 declaration for iso-8859-1, I get the
following result :

xof@brasserie:/home/xof/print$ cat remote.xml 
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE board PUBLIC "CO1N
CO1N !" "http://phplop.org/dtd/tribune-1.0.dtd">
<board site="localhost">

        <post time="20061101114430" id="67035">
                <info>wmCoinCoin/2.5.1e-1 (palmipede; Linux 2.6.18-1-686
i686)</info>
                <message>taiste </message>
                <login>xof</login>
        </post>

</board>
xof@brasserie:/home/xof/print$ ./print remote.xml 
Defaulting to eiffel parser
parsing data...
<!DOCTYPE board PUBLIC CO1N CO1N ! http://phplop.org/dtd/tribune-1.0.dtd >
/home/xof/print/remote?xml:2:87:No handler for URL scheme
exiting...

It's seems better. I do not have the possibility to choice the input
encoding (this comes from another component that I didn't wrote). So, I
wonder if somebody may have a solution to parse an iso-8859-15 file. At
least, is it possible to force the parser to work as latin-1 encoding even
if the xml declares itself as latin-9 ? 

Thanks in advance,

Christophe.



To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gobo-eiffel/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.