Yeah - CDATA in an attribute - I figured that's where it was choking -
now that I think of it, not the best idea anyway.  The attribute meant
for a very small amount of text, like the title of a button. That's why
it was in an attribute.  The reason for CDATA was because it will be
HTML formatted text.  

I put the value in it's own node instead and it works OK now.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>>Sent: Thursday, March 16, 2006 1:29 PM
>>To: Flashcoders mailing list
>>Subject: Re: [Flashcoders] Question for XML Style Junkies
>>
>>
>>??? CDATA tag inside attribute ???
>>
>>
>>--Keith H--
>>
>>----- Original Message -----
>>From: "Merrill, Jason" <[EMAIL PROTECTED]>
>>Date: Thursday, March 16, 2006 12:08 pm
>>Subject: [Flashcoders] Question for XML Style Junkies
>>
>>> My XML file takes the following form:
>>>
>>> <?xml version="1.0" encoding="iso-8859-1"?>
>>> <home>
>>>   <banner imageUrl="media/banner.jpg" x="0" y="0"/>
>>>   <bar title="Home" x="10" y="0" width="750" height="30"/>
>>>   <panels>
>>>      <panel title="Message" x="10" y="10" height="150" width="250">
>>>         <button title="Read Article" action="switchTab"/>
>>>         <content title="<![CDATA[Some<br>HTML Text in <br>here]]>">
>>> <![CDATA[Lorem Ipsum Paragraph Text Here]]>
>>>         </content>
>>>      </panel>
>>>      <panel title="HR Toolbox" x="220" y="10" height="150"
>>> width="150">         <button title="Send e-mail" action="sendEmail"
>>> param1="message"/>
>>>         <content title="<![CDATA[Some<br>HTML Text in <br>here]]>">
>>>     <![CDATA[Lorem Ipsum Paragraph Text Here]]>
>>>         </content>
>>>      </panel>
>>>      <panel>
>>>      ...etc. ...etc.
>>>   </panels>
>>> </home>
>>>
>>> However, after I load it into Flash, it gets truncated to:
>>>
>>> <?xml version="1.0" encoding="iso-8859-1"?>
>>> <home>
>>>   <banner imageUrl="media/banner.jpg" x="0" y="0" />
>>>   <bar title="Home" x="10" y="0" width="750" height="30"/>
>>>   <panels>
>>>      <panel title="Message" x="10" y="10" height="150" width="250">
>>>         <button title="Read Article" action="switchTab"/>
>>>      </panel>
>>>   </panels>
>>> </home>
>>>
>>> I am assuming the way I am using CDATA tags are throwing it off
>>> somehow.For example, I have a CDATA tag inside an attribute value
>>> under the
>>> Home/Panel/Panel[0]/Title attribute value and this is where it
>>> seems to
>>> break.  Is this bad form and/or causing Flash to choke?  If not,
what
>>> could be causing this?  If this is bad XML form, how would you
>>> reorganize it to work in Flash?
>>>
>>> ---------------------------------------------------------------
>>> FYI - FWIW:
>>> I am loading the XML in a standard way:
>>>
>>> var xmlObject = new XML();
>>> xmlObject.ignoreWhite = true;
>>> xmlObject.onLoad = Delegate.create(this, loadSuccess);
>>> xmlObject.load("home.xml")
>>>
>>> and the delegate function just moves the playhead once the file is
>>> loaded - when I get to the frame after it's loaded, I do a trace on
>>> theXML and see the truncation as described.
>>> ------------------------------------------------------------------
>>> Ideas?
>>>
>>> Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>>>
>>>
>>>
>>>
>>>
>>> NOTICE:
>>> This message is for the designated recipient only and may contain
>>> privileged or confidential information. If you have received it in
>>> error, please notify the sender immediately and delete the
>>> original. Any other use of this e-mail by you is prohibited.
>>> _______________________________________________
>>> 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