Okay folks – here’s the companion piece of code to the bib parser I posted a few weeks ago!
http://www.daveyp.com/files/stuff/xmlparser/search.pl
As with the previous code, this is alpha at best and should be treated as such. However, if you have any suggestions then please feed them back to me.
As well as specifying your own $url, you can also tweak the $maxResults value to determine just how many results you’ll actually get back. This will override the npp value in the URL — this means you should be able to lift a keyword search URL from HIP (which might just return sets of 10 or 20 at a time) and get the script to actually bring back as many results as you want (e.g. 100 or 1,000).
Continue reading “HIP XML Parser (v0.01) – search parser”
Tag: xml
HIP XML Parser (v0.01)
This is some code that I’ve been meaning to make available for public consumption for weeks, but we’ve been up to our necks with our RFID tender at Huddersfield recently.
The basic idea is to convert the XML output of HIP 2 and HIP 3 into a Perl data structure, which you can then use to repurpose your bib data and searches for other uses (e.g. to provide an OpenSearch interface).
The first chunk of code I’m making available provides a function (parseBib) that will convert the XML from a full bib page into a data structure. Given the v0.01, you should treat this as alpha code at best!
http://www.daveyp.com/files/stuff/xmlparser/bib.pl
The above Perl script also contains some code to fetch the XML (using LWP) and will also dump (using Data::Dumper) the resulting Perl data structure to an output text file (dump_output.txt). I’ve also uploaded the code as a CGI file that you can run to display the Data::Dumper output – e.g.:
Building an object-oriented database system : the story of O2 /
Just to get you started, here’s some further info…
Continue reading “HIP XML Parser (v0.01)”