Re: Re: ? PHP in XML document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote in message 
>news:31.DD.33075.C2700034@xxxxxxxxxxxxxxx
>  
>
>>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 
>>    
>>
>
>  
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux