So I'm working on a project... I'm reading xml nodes and placing each node into
dynamic text
fields...
XML:
content![CDATA[Blah blah a href=somelink.comsomeLink/a b some bold
text
/b]]/content
The problem is the XML Node is not reading as a string and the html text field
reads the node as a
here is the snipit of code:
local.obCredits[this.firstChild.childNodes[i].firstChild.childNodes[j].nodeName]
=
this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;
local.obCredits --- This is passed as an object later to a Class.
Flash doesn't actuall support the CDATA tag. It sort
of does, but all 's and 's get replaced with lt;'s
and gt;'s.
When you stick it in a text field, it correctly
interprets the HTML entities, which leads to you
getting HTML tags where they shouldn't be.
--- Chris W. Paterson [EMAIL PROTECTED]
Chris W. Paterson wrote:
this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--- this is
how I am trying to
access the content of that node.
First off, I'm guessing I should use .nodeValue? Will that give me the entire
node with
![CDATA[]]? Is it even possible to read the html
If you're using Flash 8, XPath was already integrated into its library/API.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris W.
Paterson
Sent: Tuesday, July 24, 2007 1:44 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] CDATA Html
: [Flashcoders] CDATA Html Text not working
But only a partial one, right? That's what I understood - others have
commented on it. I have used xfactorstudios Xpath classes instead. AS3
takes care of it though if you can go that route.
Jason Merrill
Bank of America
GTO Learning Leadership Development
Great! That works! Thanks so much!!
I'll look into that XPath... Maybe not for this project since it's on a tight
deadline, but for
the future!
Thanks!
Chris
--- Alan MacDougall [EMAIL PROTECTED] wrote:
Chris W. Paterson wrote:
PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday, July 24, 2007 2:00 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] CDATA Html Text not working
But only a partial one, right? That's what I understood - others have
commented on it. I have used xfactorstudios Xpath classes
8 matches
Mail list logo