Re: [PEPr] Comment on XML::XML_FastCreate

From: Date: Sat, 10 Apr 2004 13:12:31 +0000
Subject: Re: [PEPr] Comment on XML::XML_FastCreate
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27387@lists.php.net to get a copy of this message
Hi,
When the overhead of checking is unnecessary, or not required (which is more often the case.) OK, if you prefer users sending mails because of invalid XML. I don't.
If you depend on a whole package for just 1 simple method - From what I remember it has already been said that, copy&paste may be more efficient.. If it's implemented correctly in the package, I'm OK with it. But currently it isn't.
Anything that encourages people to write code that is impossible to read is never a good idea :) - I would recomend marking the 'non_array' version as depreciated, or at least sticking a warning, noting that, using all the arguments will make you code very difficult to read.... I will definitely not do that.
There are people who prefer passing several parameters instead of an array. And it can be useful, as some IDEs parse the docblocks and will tell the developer which parameters to pass. If I get the hint to pass an array, that's not very useful. Furthermore, only three parameters are needed in most cases: tagname, attributes and content.
AFAIK XML_HTMLSax assumes that the HTML is XML parseable????? - which is rarely the case??? Then you should take a look at the package, again.
From the package overiew: "XML_HTMLSax is a SAX based XML parser for badly formed XML documents, such as HTML." Best regards, Stephan

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