您好,欢迎光临本网站![请登录][注册会员]  
文件名称: XML Processing with Perl, Python, and PHP (2002).pdf
  所属分类: Python
  开发工具:
  文件大小: 2mb
  下载次数: 0
  上传时间: 2019-08-19
  提 供 者: drji*****
 详细说明: Introduction A lmost ten years ago, my introduction to the commercial world was handling and dealing with the databases of a UK government body. We used a free text-retrieval system to store information about software products, teachers, and trainers. Although we had fields for the information, when we entered a search, we were sear ching the whole document, not just one field or a collection of them. One of my jobs was to write programs that processed the information, deduced the fields, extracted compound addresses and telephone numbers, and tidied up the results to put into a new version of the database. Access to the database was through a Sun-based Unix system, and the PCs and Macs on the network didn’t talk to each other, but they did talk over Telnet to the Sun database server. You could do searches, edit information, and cut and paste, but you had no control over how the information looked without manually massaging the text you’d just copied. Ten Years Later Ten years later, for the most part I still do the same thing, although not with the same com- pany or the same information. Ultimately, though, I’m still working with databases and stor- age systems that rely on managing and dealing with a lot of text, but in a structured way that is somehow intelligent enough to know what I’m storing but flexible enough not to restrict what it is I want to store. The information I’m dealing with has to be accessible on a number of different platforms. In my home office alone, I’ve got Macs, Unix, Linux, at least five different versions of Win- dows, and handhelds running EPOC32 and PalmOS. They support different character sets, and I have to be able to convert the information into more usable formats, such as HTML for display, or stored in more rigid systems, like an RDBMS. What should I use? Do I play with a free text-retrieval system again? If I use a database system, how will I transfer my contacts from my desktop Mac to my portable Windows notebook or to Palm? If I want to view the information online, can I con- vert it easily? If I build an application that provides me with access to the information, how do I go about storing my preferences? How do I make the information available over the net- work in a format that can be accessed by all the machines that need to use it? 4021fm.qxd 11/2/01 4:27 PM Page xxi xxii The Solution The solution, if you haven’t guessed it already, is that I should use XML, the Extensible Markup Language. I get all the flexibility I need without losing any capabilities. I can add new fields, structures, and layouts to the information without breaking any of the existing tools. I can use fairly standard applications to convert the XML information into a more suit- able format. In fact, I can easily convert an XML document into a structured database, and I can query the database using SQL and export the records back in XML format. Alternatively, I can store everything in XML and access, process, and update the infor- mation directly. If I want, I can even query the XML document using XQL. I can use it to exchange information between platforms and, because all the information is in a standard and easily processed format, I should be able to use the information on any platform I have access to. The Tools I’m not actually a firm believer in being to able to specify the “right” tool for the job. Each programming job is different and may well have a number of different solutions and possible tools that would ease the process. However, I do know that scripting languages offer one of the fastest development environments, and many offer a wider range of supported platforms (and more accessible methods) than more traditional XML processing tools based on Java or C/C++. Python, for example, runs on MacOS, Unix, Windows and PalmOS. Rebol runs on even more. AppleScript is a standard part of every MacOS revision since 8.0 and is even included in MacOS X. Perl is supplied as standard with most Linux revisions, and even some commer- cial Unix installations include Perl as a standard option. In fact, I have access to a wider range and more easily accessible set of development tools off the shelf than any Java or C/C++ development environment I know of. Furthermore, some of them are so easy to use that it’s hard to understand why you would even look at another language. Did you know, for example, that you can talk to any application in MacOS with AppleScript? Think about what you could do if only you knew how to tell Perl to convert your XML- based documents into Word documents for editing, or to HTML for viewing on the Web, or to SQL tables for storage in a database! Introduction 4021fm.qxd 11/2/01 4:27 PM Page xxii xxiii This Book If you haven’t already guessed, this book is all about parsing, processing, and working with XML using a variety of scripting languages. After a brief XML refresher, I address the lan- guages in turn to show how each provides solutions for getting at the power of XML. Along the way, I address some of the important protocols, such as SOAP and XML-RPC, that make seamless data transfer possible. Throughout this book you’ll find sample scripts. You can download the complete versions of the scripts by going to www.sybex.comand following the link to the page for this book. XML seems to be everywhere today and used in a myriad of ways, especially in the vital and growing world of e-commerce. This book is designed to help you make the most of it. I hope that you will return to these pages often as you discover more uses for XML
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索:
 输入关键字,在本站1000多万海量源码库中尽情搜索: