On Monday, July 21, 2003, at 10:35 PM, Jo�l Guillod wrote:

1) Consider that you:

set the htmltext of field 1 to that -- : ...

<p>&copy;2003 by Jo&euml;l Guillod</p>
<p><font color="#0000FF"><u>[EMAIL PROTECTED]</u></font></p>
<p></p>


2) execute this test script:

on test
put "<fld1>" & (the HTMLtext of fld 1) & "</fld1>" into xmldata
put revCreateXMLTree(xmldata,false,true,false) into fldTreeID

[snip]

3) Why dont I get the same than the original data: i.e. why xmldata is not
xmlDataRestored? The procedure looses the diacritics (the euml for � and
nothing for the copyright character). I actually get:

<fld1><p>2003 by Jol Guillod
[EMAIL PROTECTED]
</p></fld1>

Warning, untested thinking,

I haven't tested for this but off hand I would say by your results that the XML parser is handling the text according to the rules of SGML correctly. Line-returns, in combination with the HTML "<p> </p>," are not being restored because they are not allowed in XML. Like empty space that is reserved for the creation of attributes in SGML, you might need to place all your text data on a single line. This might then result in a returned chunk of HTML text that will render correctly.

Example:
<p>&copy;2003 by Jo&euml;l Guillod</p><p><font color="#0000FF"><u>[EMAIL PROTECTED]</u></font></p><p></p>

You might further test XML by placing all your HTML text in one line & into an attribute in combination with including the escape-sequences for the quote characters.

Example:
<htmlChunk text="<p>&copy;2003 by Jo&euml;l Guillod</p><p><font color= &quote;#0000FF&quote;><u>[EMAIL PROTECTED]</u></font></p><p></p>"></htmlChunk>

Mark Brownell


Reply via email to