The power of Google search reveals this as the first result: AS3: public function htmlUnescape(str:String):String { return new XMLDocument(str).firstChild.nodeValue; } public function htmlEscape(str:String):String { return XML( new XMLNode( XMLNodeType.TEXT_NODE, str ) ).toXMLString (); }
or AS2: function htmlUnescape(str:String):String { return new XML(str).firstChild.nodeValue; } function htmlEscape(str:String):String { return new XMLNode( 3, str ).toString(); } On Jan 28, 1:29 am, Rejeev Thomas <rejeevtho...@gmail.com> wrote: > Thanks Zac .C# its working fine. > > Any idea of using HtmlDecode in FLEX > > Thanks > Rejeev > > On Thu, Jan 28, 2010 at 11:01 AM, Zac Bowling <zbowl...@gmail.com> wrote: > > Also: > >http://weblogs.sqlteam.com/mladenp/archive/2008/10/21/Different-ways-... > > Zac Bowling > > > On Wed, Jan 27, 2010 at 9:28 PM, Zac Bowling <zbowl...@gmail.com> wrote: > > >> Entity codes. > > >> Just decode them... > > >> using System.Web; > >> ... > >> string decoded_stuff = HttpUtility.HtmlDecode(encoded_stuff); > > >> There is a way to do this with System.Xml but whatever. > > >> Zac Bowling > > >> On Wed, Jan 27, 2010 at 9:10 PM, Rejeev Thomas > >> <rejeevtho...@gmail.com>wrote: > > >>> Please help friends! > > >>> Thanks Ryan! > > >>>> I am taking an XML response from * > >>>>http://twitter.com/statuses/friends_timeline.xml*and it happens when I > >>>> post a Tweet in my home language and trying to read it ,follwoing are > >>>> some > >>>> of the Text. > > >>>> *<?xml version="1.0" encoding="UTF-8"?> > >>>> <statuses type="array"> > >>>> <status> > >>>> <created_at>Wed Jan 27 04:19:36 +0000 2010</created_at> > >>>> <id>8265961626</id> > > >>>> <text>ഇന്ത്യക്കാരുടെ > >>>> ആശങ്ക > >>>> പരിഗണിക്കണമെന്ന് > >>>> ഓസീസ് > >>>> ബിഷപ്പ്: > >>>> മെല്‍ബണ്‍: > >>>> ഓസ്‌ട്രേലിയയില്‍ > >>>> ഇന്ത്യക്കാര്‍ക്കെതിരെ > >>>> നടക്കുന്ന > >>>> ആ...</text>* > > >>>> The above are the junk characters responded , also made convert to UTF8 > >>>> but its not converting. > > >>>> please help. > > >>>> Thanks, > >>>> Rejeev. > > >>>> On Mon, Jan 25, 2010 at 9:14 PM, ryan alford > >>>> <ryanalford...@gmail.com>wrote: > > >>>>> Can you paste an example of the bad characters as .Net shows them, and > >>>>> what they should really be? > > >>>>> Ryan > > >>>>> On Mon, Jan 25, 2010 at 5:36 AM, Rejeev <rejeevtho...@gmail.com>wrote: > > >>>>>> Hi all, > > >>>>>> My Twitter response XML contains some unicode characters , I am not > >>>>>> able to read that in C#.net. Its showing junk characters. Please help > >>>>>> me to read that in proper text. > > >>>>>> Thanks, > >>>>>> Rejeev