I have been continually frustrated by XML modules. They were all either hard to use, had ridiculous dependencies, took too much memory, or some horrible Lovecraftian combination of those. So, when Adam Kennedy recently muttered on the datetime mailing list about his *::Tiny modules, I decided to
do XML right. The result is XML::Tiny, which (according to its documentation) implements a useful subset of XML. Secretly, I think it implements
the useful subset. The core parser is less than 20 lines of code and is sufficient to parse an RSS feed or the responses from Amazon's web services. It should be compatible with perl 5.004_05 and with XML::Parser with the XML::Parser::EasyTree style, has no dependencies outside the core, and consumes as near as damnit no memory.
People need to know... (Score:2)
Re: (Score:2)
And what's this guy going on about the other modules having too many dependencies? XML::Parser::Lite has none, last I looked. And wasn't RETARDED.
EXACTLY between line 1 and the last, inclusive (Score:2)
He (or you!) should just grab XML::Parser::Lite and release it as a standalone module. The fact that XML::Parser::Lite is currently available only in that SOAP dist is a great big mistake-- and a mistake which bears fixing, which is more than I can say for this XML::Tiny mess.
Re: (Score:2)
"His attribute syntax rejects half the XML that I write in the course of a day" is not constructive criticism. Please try again.
That is, please try again if you expect me to pay any attention.
Re: (Score:2)
Re: (Score:2)
I would note that despite the doom-saying XML fanboys in this thread, I have had more feedback from people saying "thanks for this really useful module" than I have for any other module I have released. Funny, that. Y'know, I think that because I'm such a nice person, I'll continue in my evil ways and keep releasing
Re: (Score:2)
Your module's key point of differentiation seems to be that it does not, in fact, comply with the XML spec. Why then are you surprised that people don't think it belongs in CPAN's 'XML' namespace?
I'm not sure that referring to people as "XML Fanboys" is helpful either.
Re: (Score:2)
There's an awful lot of things in life and on the CPAN which, like this module, are sufficiently complete to be useful without being perfect. Paracetamol is one example. It is sold as a pain reliever, despite the fact that under some circumstances it will rot the liver, which I am sure is not a particularly pleasan
Re: (Score:2, Informative)
Yes. I've just packaged it up and uploaded it to CPAN, and I'm currently waiting to hear back from the authors about getting co-maint permissions.
Re: (Score:2)
As for "It's ... a tag-soup parser" - yes, well done, you spotted that it is a non-validating XML module. I know this may come as a shock, but such things are actually use
Re: (Score:2)
You're entirely missing the point. This is not about being a subset of the functionality or anything, this is not an XML parser. The problem is not about validation -- no one sane cares about that -- the problem is about well-formedness. There is a lot of perfectly good XML out there that this thing won't parse, and there is a lot of completely wrong XML that it won't flag as such.
If you want to write and release a parser for "vague stuff that has angle brackets in it" and find it useful that's won
-- Robin Berjon [berjon.com]
Re: (Score:2, Insightful)
YAML::Tiny [cpan.org] does not support the entire YAML specification.
Config::Tiny [cpan.org] does not support some elements of the Windows
Taken literally, CSS::Tiny is not a CSS parser, YAML::Tiny is not a YAML parser and Config::Tiny is not a Windows
In exchange for sacrificing some completeness and correctness,
Re: (Score:2)
As I said, if people find this sort of thing useful, let them have it, I have no issue with that. Just don't call it XML. It's not. NotXML::Tiny or TagParser::Tiny would be fine. Furthermore the documentation is extremely misleading in that it claims to support a subset of XML -- that is not the case. It would support a subset of XML if every document it understood could also be successfully parsed by an XML parser, but didn't support some things that an XML parser would report. As it is, it supports all
-- Robin Berjon [berjon.com]
Re: (Score:2)
If you were to bother to tell me *what* it su
Re: (Score:2)
Re: (Score:2)
Personally, I have a considerably higher opinion of the users than that.
Re: (Score:2)
I don't think that users are too stupid to read the documentation, but I do think that they will tend to believe it when they read it, and unfortunately it is misleading, as explained in http://use.perl.org/comments.pl?sid=34409&cid=52943 [perl.org], and will waste their time. That's not playing nice.
-- Robin Berjon [berjon.com]
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Memory Usage (Score:2)
Well, at least until
parsefile()slurps that 20MB XML file anywayRe: (Score:2)
Constructive criticism: (Score:2)
The synopsis shows:
But it doesn't tell me what $document looks like. Am I going to call methods on it to get what's in it? Is it a bunch of hashes of arrays of hashes? How do I use it?
I'm sure that's answered later in the docs, but to me the synopsis ought to demonstrate enough of the API to give me the flavor of it so I can decide if I want to spend the time reading the docs to learn the module.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers