Thanks Ryan, that's what I was looking for.  So this must be a failing
of XFactorstudio's Xpath classes - and Flash's xml.parseXML() or
nodeValue does the decoding automatically?  Or does anyone know a way to
get Xfactorstudios Xpath classes to decode entities?

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Ryan Matsikas
>>Sent: Wednesday, June 07, 2006 11:30 AM
>>To: Flashcoders mailing list
>>Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
>>
>>Why not let flash do the work for you?
>>
>>function convertEntities(p_str:String):String {
>>    var x:XML = new XML(p_str);
>>    x.parseXML();
>>    return x.firstChild.firstChild.nodeValue;
>>}
>>
>>var xmlStr:String = '<item>This is the &quot;String I want in
quotes&quot;
>>please help.</item>';
>>trace(convertEntities(xmlStr)); // This is the "String I want in
quotes"
>>please help.
>>
>>
>>On 6/7/06, Merrill, Jason <[EMAIL PROTECTED]> wrote:
>>>
>>> Jim - I tried out your static class and it works great for my
problem -
>>> thanks!
>>>
>>> Jason Merrill
>>> Bank of America
>>> Learning Technology Solutions
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> >>-----Original Message-----
>>> >>From: [EMAIL PROTECTED]
[mailto:flashcoders-
>>> >>[EMAIL PROTECTED] On Behalf Of Jim Cheng
>>> >>Sent: Tuesday, June 06, 2006 6:39 PM
>>> >>To: Flashcoders mailing list
>>> >>Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
>>> >>
>>> >>Merrill, Jason wrote:
>>> >>
>>> >>> Is there an Actionscript 2.0 or Xpath equivalent to Javascript
and
>>> >>> Actionscript 3.0's
>>> >>>
>>> >>> decode(theStringWith&quot;Special&quot;Characters);
>>> >>
>>> >>Hey Jason,
>>> >>
>>> >>I've run into the same issue about a month ago with XML documents
that
>>> a
>>> >>client had generated from their database, character entities
included.
>>> >>
>>> >>I couldn't find a built-in solution for converting the character
>>> >>entities back into Unicode characters, so I went online, found the
>>> >>specs, wrote a little scraper utility to grab the mappings for me
and
>>> >>then wrote a small utility class to use the data for encoding and
>>> >>decoding. It's a simple static class with inline JavaDoc-style
>>> >>documentation.  Hope this works for you.
>>> >>
>>> >>You can grab it here:
>>> >>
>>> >>     http://dev.psalterego.com/CharacterEntity.as
>>> >>
>>> >>
>>> >>Regards,
>>> >>Jim
>>> >>_______________________________________________
>>> >>Flashcoders@chattyfig.figleaf.com
>>> >>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
>>> _______________________________________________
>>> Flashcoders@chattyfig.figleaf.com
>>> 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
>>>
>>_______________________________________________
>>Flashcoders@chattyfig.figleaf.com
>>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
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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