Re: METS/XML Search facility

From: Date: Mon, 27 Sep 2004 13:26:38 +0000
Subject: Re: METS/XML Search facility
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197948@lists.php.net to get a copy of this message
Dan Field wrote:
I'm trying to write an XML Document search engine specifically for METS encoded data ( http://www.loc.gov/standards/*mets*/ ). I've tried knocking together some proof of concept code in PHP4 using both DOM and xml_parser but I've run into dificulties with both. Can anyone point me at some code/class which enables me to search within an XML document for the existance of $string within a set list of tags eg. <METS:title>Some Title Here</METS:title> <METS:description>This is a description of this document</METS:description> It seems like a very straightforward task.
You can do searching from the function that is designated as the character handler (if you are using the xml_* functions). You would just have to keep track of what tag you are checking by setting flags, etc. With DOM, you would have to use xparth. Perhaps the easiest way to search would be to use the XML_Serialize/Unserialize classes from PEAR.

« previous php.general (#197948) next »