|
From: Grant M. <gr...@us...> - 2003-10-15 09:43:46
|
Update of /cvsroot/perl-xml/perl-xml-faq
In directory sc8-pr-cvs1:/tmp/cvs-serv21331
Modified Files:
perl-xml-faq.xml
Log Message:
- de-emphasised XML::DOM and 'promoted' XML::LibXML
Index: perl-xml-faq.xml
===================================================================
RCS file: /cvsroot/perl-xml/perl-xml-faq/perl-xml-faq.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- perl-xml-faq.xml 14 Oct 2003 09:13:47 -0000 1.10
+++ perl-xml-faq.xml 15 Oct 2003 09:43:34 -0000 1.11
@@ -442,8 +442,9 @@
interfaces. The stream interface is not SAX, so don't use it for any new
code. The tree interfaces are not a lot of fun to work with either.
They're non-standard (no DOM support), not OO and offer no real API. The
- reason you want <classname>XML::Parser</classname> is because it provides
- a solid base which is used by the modules you want to use.</para>
+ reason you might want <classname>XML::Parser</classname> is because it
+ provides a solid base which is used by other modules with better
+ APIs.</para>
<para>Before you rush off and try to install
<classname>XML::Parser</classname>, make sure that you haven't got it
@@ -462,88 +463,80 @@
</answer>
</qandaentry>
- <qandaentry id="xml_dom">
+ <qandaentry id="xml_libxml">
<question>
- <para><classname>XML::DOM</classname></para>
+ <para><classname>XML::LibXML</classname></para>
</question>
<answer>
- <para>Enno Derksen's <classname>XML::DOM</classname> implements the
- <ulink url="http://www.w3.org/TR/REC-DOM-Level-1/">W3C DOM Level 1</ulink>
- tree structure and API (DOM Level 1 does not include namespace support).
- Although you can find nodes in the tree by tag name, you can't use XPath
- expressions.</para>
-
- <para>The distribution includes
- <classname>XML::DOM::ValParser</classname> which performs validation
- while building the DOM tree. It also includes
- <classname>XML::Handler::BuildDOM</classname> which can build a DOM tree
- from SAX (version 1) events.</para>
-
- <para>TJ Mather is currently the maintainer of this package.</para>
+ <para><classname>XML::LibXML</classname> provides a Perl wrapper around
+ the GNOME Project's libxml2 library. This module was originally written
+ by Matt Sergeant and is now actively maintained by Christian Glahn. It
+ is very fast, complete and stable. It can run in validating or
+ non-validating modes and offers a DOM with XPath support. The DOM and
+ associated memory management is implemented in C which offers significant
+ performance advantages over DOM trees built from Perl datatypes. The
+ <classname>XML::LibXML::SAX::Builder</classname> module allows a libxml2
+ DOM to be constructed from SAX events.
+ <classname>XML::LibXML::SAX</classname> is a SAX parser based on the
+ libxml2 library.</para>
</answer>
</qandaentry>
- <qandaentry id="xml_simple">
+ <qandaentry id="xml_xpath">
<question>
- <para><classname>XML::Simple</classname></para>
+ <para><classname>XML::XPath</classname></para>
</question>
<answer>
- <para>Grant McLean's <classname>XML::Simple</classname> was originally
- designed for working with configuration files in XML format but it can be
- used for more general purpose XML work too. The 'simple tree' data
- structure is nothing more than standard Perl hashrefs and arrays - there
- is no API for finding or transforming nodes. This module is also not
- suitable for working with 'mixed content'.
- <classname>XML::Simple</classname> has it's own <ulink
- url="http://search.cpan.org/dist/XML-Simple/lib/XML/Simple/FAQ.pod">frequently asked
- questions</ulink> document.</para>
-
- <para>Although <classname>XML::Simple</classname> uses a tree-style, the
- module also supports building the tree from SAX events or using a simple
- Perl data structure to drive a SAX pipeline.</para>
+ <para>Matt Sergeant's <classname>XML::XPath</classname> module provides a
+ DOM implementation (in Perl) which supports XPath queries. It can't
+ rival <classname>XML::LibXML::SAX</classname> for speed but it may be
+ easier to install - especially if you don't have a compiler. Parsing XML
+ documents is performed by the expat library via
+ <classname>XML::Parser</classname>. You can serialise the DOM to SAX
+ events.</para>
</answer>
</qandaentry>
- <qandaentry id="xml_xpath">
+ <qandaentry id="xml_dom">
<question>
- <para><classname>XML::XPath</classname></para>
+ <para><classname>XML::DOM</classname></para>
</question>
<answer>
- <para>Matt Sergeant's <classname>XML::XPath</classname> module provides a
- DOM implementation (in Perl) which supports XPath queries. Parsing XML
- documents is performed by the expat library via
- <classname>XML::Parser</classname>. You can serialise the DOM to SAX
- events.</para>
+ <para>Enno Derksen's <classname>XML::DOM</classname> implements the
+ <ulink url="http://www.w3.org/TR/REC-DOM-Level-1/">W3C DOM Level
+ 1</ulink> tree structure and API. It should not be your first choice of
+ DOM module however, since it lacks XPath and namespace support and it is
+ significantly slower than libxml.</para>
+
+ <para>TJ Mather is currently the maintainer of this package.</para>
</answer>
</qandaentry>
- <qandaentry id="xml_libxml">
+ <qandaentry id="xml_simple">
<question>
- <para><classname>XML::LibXML</classname></para>
+ <para><classname>XML::Simple</classname></para>
</question>
<answer>
- <para><classname>XML::LibXML</classname> provides a Perl wrapper around
- the GNOME Project's libxml2 library. This module was originally written
- by Matt Sergeant and is now actively maintained by Christian Glahn. It
- is very fast, complete and stable. It can run in validating or
- non-validating modes and offers a DOM with XPath support. The DOM and
- associated memory management is implemented in C which offers significant
- performance advantages over DOM trees built from Perl datatypes. The
- <classname>XML::LibXML::SAX::Builder</classname> module allows a libxml2
- DOM to be constructed from SAX events.</para>
+ <para>Grant McLean's <classname>XML::Simple</classname> was originally
+ designed for working with configuration files in XML format but it can be
+ used for more general purpose XML work too. The 'simple tree' data
+ structure is nothing more than standard Perl hashrefs and arrays - there
+ is no API for finding or transforming nodes. This module is not suitable
+ for working with 'mixed content'. <classname>XML::Simple</classname> has
+ it's own <ulink
+ url="http://search.cpan.org/dist/XML-Simple/lib/XML/Simple/FAQ.pod">frequently
+ asked questions</ulink> document.</para>
- <para><classname>XML::LibXML</classname> can also generate SAX events but
- this is implemented by parsing the complete document to a DOM tree and
- then serialising the tree to SAX events. This is still quick for
- moderately sized documents but doesn't offer SAX's normal low memory
- advantages for large documents.</para>
+ <para>Although <classname>XML::Simple</classname> uses a tree-style, the
+ module also supports building the tree from SAX events or using a simple
+ Perl data structure to drive a SAX pipeline.</para>
</answer>
</qandaentry>
|