<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2><FONT size=3><FONT face=Courier
size=2>Hello</FONT></FONT></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><FONT face=Courier>When</FONT> <FONT face=Courier>I want
to convert a string (which is like an xml document) in a document
JDOM, I have a problem when there is a &.</FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Courier>Must I need to convert & by
&amp; in the string or SAXbuilder can do it? How can i
do ?</FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Courier></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Courier>the exemple</FONT></DIV>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">String</SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">
<SPAN style="COLOR: black">toto</SPAN> <SPAN style="COLOR: black">=</SPAN> <SPAN
style="COLOR: #2a00ff">"<root><footer>TO&TO</footer></root>"</SPAN><SPAN
style="COLOR: black">;</SPAN></SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><?xml:namespace
prefix = o ns = "urn:schemas-microsoft-com:office:office"
/><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="COLOR: black">SAXBuilder</SPAN> <SPAN style="COLOR: black">builder</SPAN>
<SPAN style="COLOR: black">=</SPAN> <B><SPAN
style="COLOR: #7f0055">new</SPAN></B> <SPAN
style="COLOR: black">SAXBuilder();</SPAN></SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="COLOR: black">Document</SPAN> <SPAN style="COLOR: black">doc</SPAN> <SPAN
style="COLOR: black">=</SPAN> <SPAN
style="COLOR: black">builder.build(</SPAN><B><SPAN
style="COLOR: #7f0055">new</SPAN></B> <SPAN
style="COLOR: black">StringReader(toto));</SPAN></SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
lang=NL
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: NL">Element</SPAN><SPAN
lang=NL
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: NL">
<SPAN style="COLOR: black">eltTmp</SPAN> <SPAN style="COLOR: black">=</SPAN>
<SPAN style="COLOR: black">doc.getRootElement();</SPAN></SPAN><SPAN lang=NL
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: NL"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=NL
style="BACKGROUND: white; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: NL"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">System.out.println(eltTmp.getChildText(</SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: #2a00ff; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">"footer"</SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">));</SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"></SPAN> </P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"> </P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA">org.jdom.input.JDOMParseException:
Error on line 1: La référence à l'entité "TO" doit se terminer par le délimiteur
';'.</SPAN><SPAN
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA"><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:466)</SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN>at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:849)</SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN>at
cibf.test.testDocJdom.main(testDocJdom.java:58)</SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA">Caused
by: org.xml.sax.SAXParseException: La référence à l'entité "TO" doit se terminer
par le délimiteur ';'.</SPAN><SPAN
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA"><SPAN
style="mso-tab-count: 1"> </SPAN>at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1172)</SPAN><SPAN
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA"><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB">at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:455)</SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left; mso-layout-grid-align: none"
align=left><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN>at
org.jdom.input.SAXBuilder.build(SAXBuilder.java:849)</SPAN><SPAN lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-GB
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA">at
cibf.test.testDocJdom.main(testDocJdom.java:58)</SPAN></P>
<P class=MsoNormal><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA"></SPAN> </P>
<P class=MsoNormal><SPAN
style="BACKGROUND: white; COLOR: red; FONT-FAMILY: Courier; mso-highlight: white; mso-bidi-language: AR-SA">thanks</SPAN></P></SPAN><SPAN
lang=EN-GB
style="FONT-FAMILY: Courier; mso-bidi-language: AR-SA; mso-ansi-language: EN-GB"><o:p></o:p></SPAN></FONT>
<DIV> </DIV></BODY></HTML>