doesn't look like a xml parser problem. I haven't tried your code but i think the error is $this->$k

alfredo wrote:

Hello,
I'm trying to parse a XML doc, but the doc has some tags like:
<REG-ORIG>

so when I try to initialize variables:

class Documenti {
    var $FILE; //nomefile
    var $NUMERO; //numerodiserie
    var ${'REG-ORIG'}; // here is the broblem
    function Documenti($aa) {
        foreach ($aa as $k=>$v)
            $this->$k = $aa[$k];
    }

i have an error:
Parse error: parse error, unexpected '$', expecting T_VARIABLE...

I tryed changing the $ position:
var {$'REG-ORIG'}; // here is the broblem

does not change anything:
Parse error: parse error, unexpected '{', expecting T_VARIABLE...

thanks for any suggestion,
Alfredo (Italy)



--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

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



Reply via email to