[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
I comed up with this $name,"attrs"=>$attrs); array_push($stack,$tag); } // end_element_handler ( resource parser, string name ) function endElement($parser, $name) { global $stack; $stack[count($stack)-2]['children'][] = $stack[count($stack)-1]; array_pop($stack); } // handler ( re

[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
So I have found this code in http://bg.php.net/manual/en/ref.xmlrpc.php and it evaluates PHP but when I try to use the PIHandler separately. It doesnt work. So I ask if someone could help me to make parser1 return an array just like parser2. PARSER1 $name"; if (count($attribs)) { fore

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Ivan, Did you try entering the code with debugger, or at least printing out what output buffer was holding, ie $content var in my example? Can you post exact code? Also, is short_tags turned on or off in php.ini? If it is on, php will get confused on first line of your xml file, it will think

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Ivan Nedialkov
Well isn't there a way instead of using only variables, to use sth like I tried it but it doesnt work The parser returns blank! On Sun, 2006-02-26 at 12:02 +0100, Bogdan Ribic wrote: > Hmmm, come to think of it, it would only work if short_open_tags ini > directive is turned OFF, which in most

Re: [PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread chris smith
On 2/26/06, Bogdan Ribic <[EMAIL PROTECTED]> wrote: > 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 :( You can turn it off with a htaccess file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
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_fil

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
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 variabl