You are here: Re: [PHP] Re: ? PHP in XML document « PHP « IT news, forums, messages
Re: [PHP] Re: ? PHP in XML document

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
>>
>>
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация