AW: [PEAR-DEV] more on XML_Serialize/Unserialize

From: Date: Wed, 27 Aug 2003 22:58:12 +0000
Subject: AW: [PEAR-DEV] more on XML_Serialize/Unserialize
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20691@lists.php.net to get a copy of this message
Hi, > It took me forever to figure that out last night. The example at the > top of the code is missing that "true" and doesn't work. Oh, I'm sorry. I'll fix this in the next release. BTW, you could have taken a look at the function defintion, the documentation there is correct... > With the version of XML_Parser in CVS, it won't matter, since > XML_Parser > will figure it out for you. You'll be able to get rid of > isFile altogether. I still don't like the patch, currently in CVS as it has some issues: // see if it's an absolute URL (has a scheme at the beginning) elseif (eregi('://', substr($fp, 0, 10))) { return $this->setInputFile($fp); Imagine an XML document like this: <a>ftp://pear.php.net</a> or: <ascii>://\\:</ascii> Although this looks silly, it will totally break the parsing of the XML string. I don't think that it's a good idea to let a script guess whether a string is a XML document or a URL. So I won't loose the $isFile parameter and start guessing what a user wants me to do. If you want to parse a file, tell me, if you want me to parse a file, URL, stream, whatever, then tell me. Stephan

« previous php.pear.dev (#20691) next »