AW: AW: AW: [PEAR-DEV] XML_Parser/XML_Tree bugs/problems, post them here please
| From: | Stephan Schmidt | Date: | Wed, 10 Sep 2003 10:15:27 +0000 |
| Subject: | AW: AW: AW: [PEAR-DEV] XML_Parser/XML_Tree bugs/problems, post them here please | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21335@lists.php.net to get a copy of this message | ||
Hi,
> If you are so kind please send me a new patch, would thank you a lot
> the extra effort. A test for the new features would be cool too, but
> nm if you don't have much time.
OK, I'll create a new patch and send it to you later today.
> Umm, let's add a new setInputString() method (there is already a
> setInputFile()), ok? So you'll have all the options avaible and we
> won't break BC.
That's ok for me, but I think it would be OK if setInput would accept a
string which will always be treated like an XML string. It's easy to decide
whether a resource or string was given but hard to decide whether is a
string or a filename...
> Ok, that's fine. But maybe the reset() should be inside the
> setInput*() methods? A user case:
OK, that's no problem. But if enabling namespaces at a later point (can be
enabled in the constructor or by calling enableNamespaces()), you have to
keep in mind to do this before calling setInput*(). That's why I put it in
the parse() method.
> One more thing, would be nice if the free() method could close the
> file resource if any.
This is currently done in the parse() method. Do you want me to remove it
from there or should it stay in both places? The only advantage of having it
in two places I can think of is that you are able to free the parser (and
the filepointer) without actually having parsed the data...
Stephan