Re: Parsing PHP variables in XML document
| From: | Bogdan Ribic | Date: | Sun, 26 Feb 2006 11:02:14 +0000 |
| Subject: | Re: Parsing PHP variables in XML document | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231101@lists.php.net to get a copy of this message | ||
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/