Play with nodeValue. As a test add the entity code into the XML file and use
nodeValue:
// XML
hut_data
titleAkbar amp; Jeffapos;s ActionScript Hut/title
/hut_data
//
// AS
theClip.txt.text = xmlNode.firstChild.firstChild.nodeValue;
//
instead of:
// XML
hut_data
titleAkbar
On 4/4/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!!!
This:
You need to decode the entities first.
function decodeEntities(entityString:String):String
{
var x:XML = new XML(n+entityString+/n);
x.parseXML();
return x.firstChild.firstChild.nodeValue;
}
Jason Merrill
Bank of America
GTO Learning Leadership Development
eTools
try puttign this into your movie..
System.useCodepage = true;
On 4/4/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
Andrew,
nodeValue works! I don't even have to convert the special characters to
entities to have it display correctly. Thanks very much.
Next Question: Do you understand How/Why it works?
Thanks,
Steven
--- Rost, Andrew [EMAIL PROTECTED] wrote:
Play with nodeValue. As a test add the
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
Hello,
You could check if your XML file is UTF-8 encoded.
Then, if it still isn't working (it should...), you could try to put
the text in a CDATA tag:
hut_data
title
![CDATA[Akbar Jeff's ActionScript Hut]]
/title
/hut_data
hth,
Cedric
try puttign this
My guess is that you were just using the node itself instead of
getting nodeValue (basically using the toString() function). If
that's the case then toString probably gives the raw data in the file,
while using nodeValue does the full conversion of the data in the
node.
-Andy
On 4/4/07,
8 matches
Mail list logo