| CPAN Ratings (Gamma) XML-Bare reviews | |
| Home | Search | About | Login |
RSS | Module Info | Add a review of XML-Bare
4 out of 4 found this review helpful:
At work, I need to parse several huge XML files (~50MB) every day to get just about 1-2 MB of data. With XML::Simple it used to take a very long time to parse each file. I was so desperate that I started doing some regexp on the XML files before sending them to XML:Simple!
I got a great speedup by switching to XML::Bare: between 5x and 25x depending on the size of the XML file!
In short, XML::Bare is great if you just want to quickly parse big XML files.
Guillaume Filion - 2008-10-16 11:43:15
Was this review helpful to you?
Yes
No
In response to mirod:
The module is not meant to adhere to any standard. It is specifically and purposefully coded to be fast and practical. I purposefully allow very loose xml to allow it to be more useful.
Note that I intend to add full mixed content support in a future release; it is just going to require a fair amount of rewrite to ensure no parsing speed is lost.
If you have any questions please feel free to ask and I will respond and attempt to add the answer into the documentation for the next release.
In response to Peter Edwards:
If you find some xml files you think are good tests and not private information, please pass them along. I had difficulty finding non-mixed xml files to test that were large enough to be fair tests.
( using a mixed xml file would give my parser an obvious unfair advantage )
As for invalid XML, the parser is pretty blind. I would like to address that in future releases. For now, closing tags are not checked against the last opened xml tag; results in an incorrect tree. Note that parsing will only fail in rare cases, which I can list in the docs if desired. Parsing is meant to complete with pretty much any sequence of text, valid or invalid. Whether the resulting tree is useful to you is what I think is important.
I agree more tests need to be added to ensure the behavior is consistent in future versions. I've already noticed certain perl versions store hashes in a different order... which caused a fail in 0.26.
To all wondering about the consistency and reliability of the module, I am attempting to make it as stable as possible while continuing to make a lot of changes to it. It is beta, but I am trying to make each release fully usable.
Once version 1.0 rolls around I am going to break away from some of the defaults, and add an option for 0.X compatibility mode. That will be a while though. No version 1.0 till the module is rock solid.
David Helkowski - 2007-12-06 07:21:14
Was this review helpful to you?
Yes
No
This module uses the XML namespace but it is NOT an XML parser:
- it doesn't support mixed content
- it allows unquoted attributes
- it supports only 1 comment per node
There seem to be more restrictions to what the parser supports, but it is hard to figure them out. As it is, it obviously both supports non-well-formed XML, and doesn't support properly some well-formed XML. Further tests would be needed to figure out exactly how the format it supports overlaps with the official XML spec.
It is quite easy to write a fast quasi-XML parser. It is a LOT more difficult, but a lot more useful, to write a real, spec-compliant parser.
I hope one day this module becomes a real XML module. As of version 0.27 it seems to bit a bit far from that goal.
This is not it at the moment.
mirod - 2007-11-27 04:20:49
Was this review helpful to you?
Yes
No
Thanks very much for XML::Bare 0.27. When I first saw this module I thought:
"another XML:: module, why?"
Then I read the docs (5*) and was interested to see just how fast it is. It does not disappoint, it is "extremely fast". I had to race it against a few other XML modules (RT#30915) and also check it was actually doing what it said it was (it is).
The docs have a section on "Parsing Limitations / Features" make sure you read it.
I'm not sure when/if I'll use this but it's nice to know it's
available. I've held off on rating anything but the docs as I've not run it on anything other than the tests it comes with. If I end up using it I'll try and remember to come back to rate the other areas. If there was a 'speed' rating it would get 5*.
I'd be more inclined to use it if it had more tests, in particular some tests on boundary cases and invalid XML - just so the current behaviour is tested - and if it changes in the future - noticed/documented.
The kwalitee page shows the Kwalitee going up:
http://cpants.perl.org/dist/kwalitee/XML-Bare
All in all, it's a very impressive contribution to CPAN and I look forward to future releases.
Peter (Stig) Edwards - 2007-11-23 09:46:50
Was this review helpful to you?
Yes
No
|
|
|