June 2000
Intermediate to advanced
556 pages
8h 45m
English
Here is the source code for version 1 of xTract.
CD-ROM reference=16007.txt """ xTract -- First Steps Toward an XML-Based Query-by-Example System for Web Resource Retrieval Given: A URL referencing an XML file An XML fragment to treat as a Query By Example template (containing Python regular expressions) Return list of matching XML fragments. XML Processing with Python Sean Mc Grath """ from geturl import geturl from pyxie import * import re,sys # Set this to 1 to get a trace view of what is # happening. debug = 1 def xTract(ResourceXML,QueryByExampleXML): """ Search an XML file, using another XML file as a query template. Return a list of matching XML fragments. """ # Initialize result. ResultFragments = [] ...
Read now
Unlock full access