Re: [Flashcoders] Decoding xml text w/no CDATA allowed
That does appear to be the case, i tried the following: textfield.htmlText = currentPand.firstChild; which shows 'bthis is bold/b' instead of bold text On the other hand, this: textfield.htmlText = currentPand.firstChild.nodeValue; Shows the text in bold, as would be expected. So i suppose using nodeValue automatically decodes the entities. On 6/7/06, Merrill, Jason [EMAIL PROTECTED] wrote: 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 = 'itemThis is the quot;String I want in quotesquot; 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(theStringWithquot;Specialquot;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 -- Toon Van de Putte Pannenhuisstraat 63 2500 Lier Belgium mobile: +32 (0)497 52 74 51 [EMAIL PROTECTED] ___ 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
Re: [Flashcoders] Decoding xml text w/no CDATA allowed
I think you just need to set the Dynamic text field to render HTML in the properties panel - its the button that looks like . I have xml that has quot;Specialquot; and it works fine. On 7/26/06, Toon Van de Putte [EMAIL PROTECTED] wrote: That does appear to be the case, i tried the following: textfield.htmlText = currentPand.firstChild; which shows 'bthis is bold/b' instead of bold text On the other hand, this: textfield.htmlText = currentPand.firstChild.nodeValue; Shows the text in bold, as would be expected. So i suppose using nodeValue automatically decodes the entities. On 6/7/06, Merrill, Jason [EMAIL PROTECTED] wrote: 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 = 'itemThis is the quot;String I want in quotesquot; 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(theStringWithquot;Specialquot;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 -- Toon Van de Putte Pannenhuisstraat 63 2500 Lier Belgium mobile: +32 (0)497 52 74 51 [EMAIL PROTECTED] ___ 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 -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search
RE: [Flashcoders] Decoding xml text w/no CDATA allowed
I think you just need to set the Dynamic text field to render HTML in the properties panel - its the button that looks like . I have xml that has quot;Specialquot; and it works fine Actually, this original thread (almost two months old now) was about character entities in XML related to the xfactorstudio's Xpath classes - rather different subject than character entities in HTML from XML text. The solution I reached with the help of this list was to use a trick with the XML class: 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 Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Carl Welch Sent: Wednesday, July 26, 2006 4:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed I think you just need to set the Dynamic text field to render HTML in the properties panel - its the button that looks like . I have xml that has quot;Specialquot; and it works fine. On 7/26/06, Toon Van de Putte [EMAIL PROTECTED] wrote: That does appear to be the case, i tried the following: textfield.htmlText = currentPand.firstChild; which shows 'bthis is bold/b' instead of bold text On the other hand, this: textfield.htmlText = currentPand.firstChild.nodeValue; Shows the text in bold, as would be expected. So i suppose using nodeValue automatically decodes the entities. On 6/7/06, Merrill, Jason [EMAIL PROTECTED] wrote: 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 = 'itemThis is the quot;String I want in quotesquot; 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(theStringWithquot;Specialquot;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
RE: [Flashcoders] Decoding xml text w/no CDATA allowed
Hey thanks Jim - I'll try this out. Looks like there is a decode(string) function in Actionscript 3.0, so hopefully this issue will go away when the 9 player gains wide acceptance. Thanks for the link. 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(theStringWithquot;Specialquot;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
RE: [Flashcoders] Decoding xml text w/no CDATA allowed
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(theStringWithquot;Specialquot;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
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 = 'itemThis is the quot;String I want in quotesquot; 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(theStringWithquot;Specialquot;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
RE: [Flashcoders] Decoding xml text w/no CDATA allowed
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 = 'itemThis is the quot;String I want in quotesquot; 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(theStringWithquot;Specialquot;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
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(theStringWithquot;Specialquot;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