|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Searching a group of xml documents
Hi, > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl- > list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of bmcleere@xxxxxxxxxx > Sent: Monday, July 14, 2003 6:11 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > Hi all, > > I need to search a repository/directory of xml documents. I want to search > each xml document for the contents of a tag called <identifier>. The > contents of the tag would be as follows: > > <identifier>Perl for Beginners</identifier> > > When a match is found I want to display the contents of the <location> tag > in the selected document to the screen which would be a URL e.g. > <location>http://www.sometag.asp</location> > > I know how to search one document and retrieve the data from it but need > help with more than one. > > Any assistance would be greatly appreciated. I would look at Jakarta Lucene for this purpose. Following is a brief overview, since doing it this way is off-topic for the xsl-list. You create an index by passing your content through a ContentHandler. Each time you come across the desired elements you add the content as Field to the document's indexed instance. After indexing your content you can run a query against it to get back a List of Hits. You iterate through the Hits to get each Lucene Document instance and then get the value of the Fields you identified in the ContentHandler. Best, -Rob > > Kindest regards, > > Brenda XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








