I have a quiz game in Flash that pulls questions from .xml files. The questions are in this format:
> <q>A book of maps</q>
I’ve noticed I can’t put quotes or apostrophes in it. If I do it doesn’t display them, it shows " or '
Someone suggested actually putting in " instead, but that just came out the same way. Any ideas of why it would do that or a way around it? Thanks for any help.
Thanks for the reply. So something along these lines?
And since your familiar with the quiz, does it matter where I call it at in the script?
for the quote (only), you must escape it. and that should be
that can be placed anywhere as long as it executes before it's called (which it will be if it's attached to the same frame where you load the text).
If you want to include punctuation inside your questions or answers you should wrap them inside CDATA blocks. This instructs the XML parser not to touch the content inside the blocks.
<q><![CDATA[Put the text in here]]></q>
Where does this output (Put the "text"in here) get displayed? In the Output window, in a formatted text field?
What happens when you trace out the xml object that loaded the xml file? The code would be something like trace(myXMLObject.q), depending on the name of your xml object and the structure of the xml file.