📄 ch01_04.htm
字号:
<html><head><title>A Myriad of Modules (Perl and XML)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Erik T. Ray and Jason McIntosh" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="059600205XL" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl and XML" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img alt="Book Home" border="0" src="gifs/smbanner.gif" usemap="#banner-map" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Perl & XML" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch01_03.htm"><img alt="Previous" border="0" src="../gifs/txtpreva.gif" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch01_05.htm"><img alt="Next" border="0" src="../gifs/txtnexta.gif" /></a></td></tr></table></div><h2 class="sect1">1.4. A Myriad of Modules</h2><p>One of<a name="INDEX-26" />Perl's strengths is that it's acommunity-driven language. When Perl programmers identify a need andwrite a module to handle it, they are encouraged to distribute it tothe world at large via CPAN. The advantage of this is that ifthere's something you want to do in Perl andthere's a possibility that someone else wanted to doit previously, a Perl module is probably already available on CPAN.</p><p>However, for a technology that's as young, popular,and creatively interpretable as XML, the community-driven model has adownside. When XML first caught on, many different Perl moduleswritten by different programmers appeared on CPAN, seemingly all atonce. Without a governing body, they all coexisted in inconsistentglee, with a variety of structures, interfaces, and goals.</p><p>Don't despair, though. In the time since themist-enshrouded elder days of 1998, a movement towards some semblanceof organization and standards has emerged from the Perl/XML community(which primarily manifests on<a name="INDEX-27" />ActiveState's<em class="emphasis">perl-xml</em><a name="INDEX-28" /> mailing list, as mentioned in thepreface). The community built on these first modules to make toolsthat followed the same rules that other parts of the XML world weresettling on, such as the SAX and DOM parsing standards, andimplemented XML-related technologies such as XPath. Later, the fieldof basic, low-level parsers started to widen. Recently, some veryinteresting systems have emerged (such as<tt class="literal">XML::SAX</tt>) that bring truly Perlish levels ofDWIMminess out of these same standards.<a href="#FOOTNOTE-2">[2]</a></p><blockquote class="footnote"> <a name="FOOTNOTE-2" /><p>[2]DWIM ="Do What I Mean," one of thefundamental philosophies governing Perl.</p> </blockquote><p>Of course, the goofy, quick-and-dirty tools are still there if youwant to use them, and <tt class="literal">XML::Simple</tt> is among them.We will try to help you understand when to reach for thestandards-using tools and when it's OK to just grabyour XML and run giggling through the daffodils.</p><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch01_03.htm"><img alt="Previous" border="0" src="../gifs/txtpreva.gif" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img alt="Home" border="0" src="../gifs/txthome.gif" /></a></td><td align="right" valign="top" width="228"><a href="ch01_05.htm"><img alt="Next" border="0" src="../gifs/txtnexta.gif" /></a></td></tr><tr><td align="left" valign="top" width="228">1.3. XML Processors</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img alt="Book Index" border="0" src="../gifs/index.gif" /></a></td><td align="right" valign="top" width="228">1.5. Keep in Mind...</td></tr></table></div><hr width="684" align="left" /><img alt="Library Navigation Links" border="0" src="../gifs/navbar.gif" usemap="#library-map" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -