Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

CDATA with XML problem in AS3

Posted on 2010-08-24
4
1,003 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Load XML file into a SQL Server Table using SSIS 2012 9 93
Transform XML to Excel using XSL 1 34
XML XSL Message 3 29
Customizing XML with Powershell 2 23
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

828 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