Everything within a CDATA is read exactly as is, I believe -- that's the
point of using it. whitespace is the whitespace between tags, not
within a CDATA text node, so ignoreWhite shouldn't affect it. I think
you'll have to butt your text content up against the [ and ] to make it
read right.
Helen
--
http://flash-creations.com
http://i-technica.com
david kraftsow wrote:
yeah that does nothing. you would think it would solve the problem but
no...
JesterXL wrote:
XML.ignoreWhite = true;
XML.load
----- Original Message ----- From: "david kraftsow"
<[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Tuesday, January 24, 2006 4:34 PM
Subject: [Flashcoders] xml whitespace problem
Hi.
Whats the easiest way to strip out that annoying whitespace from your
xml nodes?
I have a lovely human-readable xml file with tons of carriage returns
and tabs. When I load it into a flash XML object the leaf/content
nodes all have tabs and carriage returns in them. Setting the
ignoreWhite property does nothing. [?] Example:
<root_1 attr_1="blahblah">
<node_1>
<![CDATA[
Leaf content 1 blah blah blah.
]]>
</node_1>
</root_1>
When I parse out that leaf content I get a string like "\n\n
Leaf content...."
Very annoying. I don't have to write a traversal method to strip it
all out do I? Surely there is a better way!
DK
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders