Article View: fr.comp.text.xml
Article #8539Re: forcer l'encoding avec JAXP
From: Rapha�l THERY
Date: Thu, 27 Sep 2001 07:29
Date: Thu, 27 Sep 2001 07:29
39 lines
2083 bytes
2083 bytes
Salut,
regardes le bout de code ci-dessous !
// Etape 3 : Cr�ation d'un TransformerFactory.
tf = TransformerFactory.newInstance();
// Etape 4 : Cr�ation d'un Transformer.
try {
transformer = tf.newTransformer ();
transformer.setOutputProperty (OutputKeys.ENCODING, "ISO-8859-1");
} catch (TransformerConfigurationException tce) {
System.err.println (tce.getMessage());
System.exit(1);
}
Rapha�l
"leXav@Home" <nobody@wanadoo.fr> a �crit dans le message news:
9osqij$9r8$1@wanadoo.fr...
> Bonjour,
>
> Je g�n�re des documents XML � partir d'une base de donn�e et le tout via
un
> moteur de servlet. Je n'arrive pas � d�finir l'attribut 'encoding' de mon
> document pour le rendre "iso-8859-1". Petit malin que je suis, J'ai bien
> tent�
>
> document.setAttribute("encoding", "iso-8859-1");
>
> mais sans gd r�sultat puisque Document n'a pas de m�thode "setAttribute()"
>
> Une id�e ?
>
> --
> leXav'
>
>
>
Technical Details
Message-ID:
<azAs7.10036$ka2.11021345@nnrp1.proxad.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!not-for-mailReferences:
<9osqij$9r8$1@wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,a850cd0bbdc3b1bd X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-09-27 00:29:14 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!nnrp1.proxad.net.POSTED!not-for-mail From: "Rapha�l THERY" <raphael.thery@free.fr> Newsgroups: fr.comp.text.xml References: <9osqij$9r8$1@wanadoo.fr> Subject: Re: forcer l'encoding avec JAXP Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <azAs7.10036$ka2.11021345@nnrp1.proxad.net> Date: Thu, 27 Sep 2001 07:29:10 GMT NNTP-Posting-Host: 195.115.154.77 X-Complaints-To: abuse@proxad.net X-Trace: nnrp1.proxad.net 1001575750 195.115.154.77 (Thu, 27 Sep 2001 09:29:10 CEST) NNTP-Posting-Date: Thu, 27 Sep 2001 09:29:10 CEST Organization: Guest of ProXad - France