Skip to main content
silver_lu
Participant
April 20, 2009
Question

xml file and htmlText box doesn't work

  • April 20, 2009
  • 1 reply
  • 505 views

Hi,

i have a action script that read a xml file and put the content of this file in a
htmltext box, but when come inside the xml file a code like this"<font color='#003399'>Test</font>" the box (htmltext) appears empty.

my code

this.my_txt.embedFonts = true;
this.my_txt.html = true;
this.my_txt.htmlText =myTextos;


The variable "myTextos" load the content from xml ...but it doesn't appears in my htmltext box

How can i fix this?

obs: When i erase the tag <font color='#003399'></font> in xml the variable "myTextos" appears correctly in my htmltext box.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 20, 2009

you probably have a malformed xml file.  unless your html tags (like <font color='#003399'>) are in cdata nodes, you do have a malformed xml file.

if you don't know how to use cdata nodes, post the contents of your xml file.

silver_lu
silver_luAuthor
Participant
April 22, 2009

Look my xml file:

<?xml version="1.0" encoding="utf-8"?>
<sm>
<item><![CDATA[<p align="center"><b>Recordações do Escrivão Isaías Caminha</b></p>
[...]

<font color='#003399'>Leiva era o chefe</font>, era a inteligência do grupo, pois, além de poeta, tinha todos os preparatórios para o curso de dentista.

[...]
  
<p><align="right"><b>Fonte:</b> BARRETO, Lima. <i>Recordações do Escrivão Isaías Caminha</i>. Rio de Janeiro: Fundação Biblioteca Nacional. Disponível em:

http://www.dominiopublico.gov.br. Acesso em 19 mar. 2008.

</p>
]]></item>
</sm>

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

why my dinamic box (in flash 8, action scrpit 2) doesn't interpret the tag <font color='#003399'>?