Solved

CDATA with XML problem in AS3

Posted on 2010-08-24
4
996 Views
Last Modified: 2013-11-11
I have this on my XML file and I'm wondering if is possible?

<contact contact_fr="Text de la page Contact" contact_en=<![CDATA["blb<br>bla<br>more bla"]]>/>

so I can load the text as HTML IN AS3
0
Comment
Question by:offrenbaruna
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 125 total points
ID: 33514456
sadly no. you can't use cdata on attributes.
0
 

Author Comment

by:offrenbaruna
ID: 33514697
grrrrrrr !!! thanks blue-genie
0
 

Author Closing Comment

by:offrenbaruna
ID: 33514712
there was no why explanation !
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 33515200
hey good point. I've always just accepted it as one of those can't be done, blame it on whoever developed SGML/XML standards. so had a quick google.

found this on wikipedia,
CDATA in DTDs
[edit] CDATA-type attribute value

In Document Type Definition (DTD) files for SGML and XML, an attribute value may be designated as being of type CDATA: arbitrary character data. Within a CDATA-type attribute, character and entity reference markup is allowed and will be processed when the document is read.

For example, if an XML DTD contains

<!ATTLIST foo a CDATA #IMPLIED>

it means that elements named foo may optionally have an attribute named "a" which is of type CDATA. In an XML document that is valid according to this DTD, an element like this might appear:

<foo a="1 &amp; 2 are < &#51; &#x0A;" />

and an XML parser would interpret the "a" attribute's value as being the character data "1 & 2 are < 3".

so maybe if you use DTD you can.
will try it at the office tomorrow as well.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now