开发工具:
文件大小: 915kb
下载次数: 0
上传时间: 2008-02-10
详细说明: Perl and XML.pdf
Table of Contents
Preface ........................................................................................................................................ 1
Assumptions .........................................................................................................................................................1
How This Book Is Organized ................................................................................................................ ...............1
Resources..............................................................................................................................................................2
Font Conventions..................................................................................................................................................2
How to Contact Us ...............................................................................................................................................2
Acknowledgments ................................................................................................................................................3
Chapter 1. Perl and XML ............................................................................................................ 4
1.1 Why Use Perl with XML? ...............................................................................................................................4
1.2 XML Is Simple with XML::Simple.................................................................................................................4
1.3 XML Processors .............................................................................................................................................7
1.4 A Myriad of Modules .....................................................................................................................................8
1.5 Keep in Mind... ...............................................................................................................................................8
1.6 XML Gotchas .................................................................................................................................................9
Chapter 2. An XML Recap........................................................................................................ 11
2.1 A Brief History of XML...............................................................................................................................11
2.2 Markup, Elements, and Structure ..................................................................................................................13
2.3 Namespaces ..................................................................................................................................................15
2.4 Spacing .........................................................................................................................................................16
2.5 Entities..........................................................................................................................................................17
2.6 Unicode, Character Sets, and Encodings .......................................................................................................19
2.7 The XML Declaration...................................................................................................................................19
2.8 Processing Instructions and Other Markup....................................................................................................19
2.9 Free-Form XML and Well-Formed Documents ............................................................................................21
2.10 Declaring Elements and Attributes ..............................................................................................................22
2.11 Schemas ......................................................................................................................................................22
2.12 Transformations..........................................................................................................................................24
Chapter 3. XML Basics: Reading and Writing.......................................................................... 28
3.1 XML Parsers.................................................................................................................................................28
3.2 XML::Parser .................................................................................................................................................34
3.3 Stream-Based Versus Tree-Based Processing ...............................................................................................38
3.4 Putting Parsers to Work ................................................................................................................................39
3.5 XML::LibXML.............................................................................................................................................41
3.6 XML::XPath .................................................................................................................................................43
3.7 Document Validation....................................................................................................................................44
3.8 XML::Writer.................................................................................................................................................46
3.9 Character Sets and Encodings.......................................................................................................................50
Chapter 4. Event Streams .......................................................................................................... 55
4.1 Working with Streams ..................................................................................................................................55
4.2 Events and Handlers .....................................................................................................................................55
4.3 The Parser as Commodity.............................................................................................................................57
4.4 Stream Applications......................................................................................................................................57
4.5 XML::PYX...................................................................................................................................................58
4.6 XML::Parser .................................................................................................................................................60
Chapter 5. SAX.......................................................................................................................... 64
5.1 SAX Event Handlers.....................................................................................................................................64
5.2 DTD Handlers...............................................................................................................................................70
5.3 External Entity Resolution............................................................................................................................73
5.4 Drivers for Non-XML Sources ......................................................................................................................74
5.5 A Handler Base Class ...................................................................................................................................76
5.6 XML::Handler::YAWriter as a Base Handler Class......................................................................................77
5.7 XML::SAX: The Second Generation.............................................................................................................78
Chapter 6. Tree Processing........................................................................................................ 90
6.1 XML Trees ...................................................................................................................................................90
6.2 XML::Simple................................................................................................................................................91
6.3 XML::Parser's Tree Mode .............................................................................................................................93
6.4 XML::SimpleObject .....................................................................................................................................94
6.5 XML::TreeBuilder........................................................................................................................................96
6.6 XML::Grove .................................................................................................................................................98
Chapter 7. DOM ...................................................................................................................... 100
7.1 DOM and Perl.............................................................................................................................................100
7.2 DOM Class Interface Reference ..................................................................................................................100
7.3 XML::DOM................................................................................................................................................107
7.4 XML::LibXML...........................................................................................................................................109
Chapter 8. Beyond Trees: XPath, XSLT, and More................................................................ 112
8.1 Tree Climbers .............................................................................................................................................112
8.2 XPath ..........................................................................................................................................................114
8.3 XSLT ..........................................................................................................................................................121
8.4 Optimized Tree Processing.........................................................................................................................123
Chapter 9. RSS, SOAP, and Other XML Applications ........................................................... 125
9.1 XML Modules ............................................................................................................................................125
9.2 XML::RSS..................................................................................................................................................126
9.3 XML Programming Tools ...........................................................................................................................132
9.4 SOAP::Lite .................................................................................................................................................134
Chapter 10. Coding Strategies ................................................................................................. 137
10.1 Perl and XML Namespaces .......................................................................................................................137
10.2 Subclassing ...............................................................................................................................................139
10.3 Converting XML to HTML with XSLT ....................................................................................................144
10.4 A Comics Index ........................................................................................................................................151
Colophon ................................................................................................................................ 154 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.