Solved

CDATA with XML problem in AS3

Posted on 2010-08-24
4
997 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JPA XML tag definition 2 65
flash in chrome 4 84
Help with SimpleXML charts with PHP 4 83
XML & .net 5 40
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

911 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

21 Experts available now in Live!

Get 1:1 Help Now