Link to home
Start Free TrialLog in
Avatar of offrenbaruna
offrenbaruna

asked on

CDATA with XML problem in AS3

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
ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of offrenbaruna
offrenbaruna

ASKER

grrrrrrr !!! thanks blue-genie
there was no why explanation !
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.