Hi Steven

Try:

theClip.txt.text = xmlNode.firstChild.firstChild.nodeValue;

Jake


On 04/04/07, Steven Loe <[EMAIL PROTECTED]> wrote:
I'm loading xml with special characters. These display as their entity codes
i.e. "&" as "&". If I put enitity codes in the xml, I still get entity
codes displaying on screen. What am I doing wrong? Any thoughts? Thanks!!!


Screen Output:
Akbar & Jeff&apos;s ActionScript Hut

my_xml.xml:
<hut_data>
        <title>Akbar & Jeff's ActionScript Hut</title>
</hut_data>


class:
class LoadXml {
        private static var xmlUrl:String = "my_xml.xml";
        private var rootRef;
        private var theClip:MovieClip;

        function LoadXml(rootRef) {
                this.rootRef = rootRef;
                var xmlDoc:XML = new XML();
                xmlDoc.ignoreWhite = true;
                xmlDoc.onLoad = function(success:Boolean) {
                        if (success) {
                                this.owner.displayData(this);
                        } else {
                                trace("error loading xml");
                        }
                };
                Object(xmlDoc).owner = this;
                xmlDoc.load(xmlUrl);
        }

        private function displayData(xmlDoc:XML) {
                var xmlNode:XMLNode = xmlDoc.firstChild;
                if (xmlNode.nodeName.toString() == "hut_data") {
                        theClip = this.rootRef.createEmptyMovieClip("theClip", 
1);
                        theClip.createTextField("txt", 10, 10, 10, 250, 20);
                        theClip.txt.html = true;
                        theClip.txt.text = xmlNode.firstChild.firstChild;
                }
        }
}





____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to