|
Posted by Torgny Bjers on 08/15/05 11:48
Well, in this case, XML would care, since you'd be using a < or > inside
a tag, so, in order for that to work, if what he meant was that he
wanted to store PHP code directly inside the XML document, and not
actually EXECUTE code INSIDE the XML file, he would have to use
<![CDATA[bla]]> syntax around the PHP code for it not to break the XML file.
So, in this case that would be:
<root>
<data><![CDATA[<?php require_once("read_database.php"); ?>]]></data>
</root>
Which works fine as long as he doesn't have ]]> somewhere in the code. :)
Satyam wrote:
>Whatever starts with <? immediatly followed by an identifier is called a
>Processing Instruction, which ends with a ?> XML doesn't care what is
>within those tags, as long as it doesn't contain a ?>
>
>Satyam
>
>
>
>""Labunski"" <romans@skulme.lv> wrote in message
>news:31.DD.33075.C2700034@pb1.pair.com...
>
>
>>Hello,
>>
>>Is it possible to write some PHP code lines in the XML document?
>>
>>e.g. I want to add <?php require_once("read_database.php"); ?> to the xml
>>document, but
>>I don't know the right syntax to do this.
>>
>>Btw, I need this, cause I'm trying to make CMS system for Flash page.
>>
>>Thanks a lot!
>>Roman
>>
>>
>
>
>
[Back to original message]
|