hello,
is there an official or a correct way for the following problem:
in my xml file, there is also html text. this xml file is used in flash and a php code.
the problem is, that - using simplexml in php - the html-tags are interpreted as xml-tags and it gets difficult to use the content. if i use > and < instead of < and or place the html-text in a CDATA, flash doesnt display the text as html and also returns errors. is it common at all, to place html into an xml-file?
a simple example of the xml-file:
----------------------------------
<?xml version='1.0' encoding='utf-8'?
<website
<site title="Titel"
<text><p>lalala <b>tada</b<font color="#ff0000">dings
</font></pand a <a href="blabla.html" target="_blank"
link</a><img src="bild.jpg"/></text
</site
</website
----------------------------------
i already have some methods of resolution to solve the problem:
- modify the html tags in the php code, so simplexml does not recognize them as xml-tags
- replace/delete the < and > or cdata by string operator in flash
- code own php script to put the xml into a php array
the point is that i want to do it correctly, use a "clean" (and perhaps not pedestrian) way so i will not have any unconsidered problems afterwards. perhaps you could suggest how to do it best - it would be great, thank you!