2 Replies Latest reply on Apr 23, 2009 7:38 AM by silver_lu

    xml file and htmlText box doesn't work

    silver_lu

      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.

        • 1. Re: xml file and htmlText box doesn't work
          kglad Adobe Community Professional & MVP

          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.

          1 person found this helpful
          • 2. Re: xml file and htmlText box doesn't work
            silver_lu Level 1

            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'>?