What's the best XML parser for Perl?

后端 未结 8 921
星月不相逢
星月不相逢 2020-12-01 07:29

I have tried many of the Perl XML Parsers. I was quite interested in the Sablotron Parser, but it is such a pain to install on a Windows box. Currently I have started usin

相关标签:
8条回答
  • 2020-12-01 08:21

    I think you are using a pretty good one. XML::LibXML, Matt Sergeant and Christian Glahn's Perl interface to Daniel Velliard's libxml2 is one of the faster XML Parsers that I know of.

    0 讨论(0)
  • 2020-12-01 08:27

    It really depends on your needs, as people have said. To parse XML files that were ~100Mb in size (gene annotations from TAIR, 1 file per chromosome), I used mirod's XML::Twig module, which lets you set callbacks to parse the elements that interest you, presenting each sub-document as an XML::Simple tree. It combines the benefits of a SAX parser (scanning the file as a stream) with a DOM parser (working more easily with the interesting pieces).

    0 讨论(0)
提交回复
热议问题