General Question

manuel_alarcon's avatar

Reading xml with flash: CDATA or just text?

Asked by manuel_alarcon (299points) March 5th, 2009

I’m thinking in developing a site entirely in flash; it will read a mysql db with text, and i think to convert the text with a php script to xml for reading it with flash.
So, when a title comes along, it writes it into the designed title tag, with no more than 45 characters. But when it comes to read the full content of an article, 100 characters or more… should i put it like CDATA? or just as text, like the title? i dont know which is the right way to do it, and why… but surely they both work

Observing members: 0 Composing members: 0

1 Answer

arpinum's avatar

If you don’t use CDATA then you need to make sure that you don’t have any reserved xml characters in your titles or stories, such as <, > and &. One thing you can do with you php script is to escape the reserved characters before passing it along, that way you don’t need to put it in CDATA. I’m assuming that you want to use e4x commands to control the data, and if so it needs to be outside a CDATA block. CDATA prevents xml formatting.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther