Re: Parsing PHP variables in XML document

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

 



Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :(

Bogdan Ribic wrote:
Hi Ivan,

You might be able to use output buffering in conjunction with including your xml file. Something like:

ob_start();
include $xml_file;
$content = ob_end_flush();

and then parse the $content string. If you are doing this from within a function and you want access to global variables, you should import all global variables first, via extract($GLOBALS);

  Btw, this is just an idea, and untested - use at your own risk :)

Boban.




--

   Open source PHP code generator for DB operations
   http://sourceforge.net/projects/bfrcg/

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