Article View: fr.comp.text.xml
Article #9238petit probleme pour creer un fichier xml
From: Fabrice J
Date: Wed, 02 May 2001 18:51
Date: Wed, 02 May 2001 18:51
44 lines
1746 bytes
1746 bytes
Bonjour,
j'utilise JDOM pour cr�er un fichier xml � partir d'un fichier xml source
contenant le squelette de l'arbre. Je remplis ce squelette avec les donn�es
d'autres fichiers que je recup�re en String par des classes java et je les
place dans mon arbre :
mon fichier xml :
<toto>
<titi>
<tata/>
</titi>
</toto>
Un extrait de mon fichier :
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(xml.source);
Element titi=doc.getRootElement().getChildren(titi)
titi.addContent("ma _donn�e")
Le probl�me est que j'ai comme resultat :
<toto>
<titi>
<tata/>
ma_donn�e</titi>
</toto>
alors que pour une question de lisibilit� j'aimerai obtenir :
<toto>
<titi>ma_donn�e
<tata/>
</titi>
</toto>
Que me conseillez vous??
Merci,
Fabrice J
Technical Details
Message-ID:
<9cpl06$1lv8$1@news5.isdnet.net>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!isdnethub!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,51d79acb931b315,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-05-02 11:52:01 PST Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!isdnethub!not-for-mail From: "Fabrice J" <fabmic@NOSPAMnoos.fr> Newsgroups: fr.comp.text.xml Subject: petit probleme pour creer un fichier xml Date: Wed, 2 May 2001 20:51:59 +0200 Lines: 51 Message-ID: <9cpl06$1lv8$1@news5.isdnet.net> NNTP-Posting-Host: r237m249.cybercable.tm.fr X-Trace: news5.isdnet.net 988829510 55272 195.132.237.249 (2 May 2001 18:51:50 GMT) X-Complaints-To: abuse@isdnet.net NNTP-Posting-Date: 2 May 2001 18:51:50 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000