June 2000
Intermediate to advanced
556 pages
8h 45m
English
In this chapter, we develop xTract—a utility for retrieving fragments of XML files matching particular search criteria on the Web.
The user specifies a search template in a manner similar to Query-By-Example systems often used with relational databases.
An example will help make this clear. The web site http://www.slashdot.org publishes an XML file on their site that lists the main stories of the day. The geturl utility developed earlier can be used to retrieve this file.
CD-ROM reference=16001.txt
C>python geturl.py http://www.slashdot.org/slashdot.xml <?xml version="1.0"?><backslash xmlns:backslash="http://slashdot.org/backslash.dtd"> <story> <title>Doubleclick's Banner Ad Patent</title> ...Read now
Unlock full access