this is a PHP XML issue, not much SRU implementation related - although
off-topic, I allow myself to give some hints.
Maybe you should take a closer look at PHP "SimpleXML"
You have to iterate by namespace over the children, like this
$xml = simplexml_load_string($content);
$namespaces = $xml->getNameSpaces(true);
$children = $xml->children($namespaces['SRW']);
The 'dc' namespace can be iterated within the records.
In Perl, XML processing from SRU is really simple, like this
my $content =
my $xs = XML::Simple->new();
my $ref = $xs->XMLin($content);
print Dumper $ref;
>>> Fred Riley <[log in to unmask]> schrieb am 19.08.2014 um 13.10
<[log in to unmask]>:
> This is my first message to this list, which I've only just joined at
> recommendation of a colleague. I'm looking to develop a website for
> Educational Resources (OER), which will query SRU services in open
> repositories. I've been trying to write PHP scripts to query SRU
> but running into the sand parsing the returned XML. My preliminary
> is: is this listserv an appropriate place to post technical queries
> SRU, or is more 'meta'?
> The query I want to post is related to, and descended from, a query I
> to StackOverflow a while back
> repository I'm wanting to query, in the first instance, is the
> installation at my current institution (SRU service URL:
> http://explor.bcu.ac.uk/IntraLibrary-SRU). An example query I need to
> the results of is:
> If I can get SRU querying of this repository working then it'll be
> applicable to other repositories.
> As background, I have experience of learning object repository
> (Intralibrary) administration, and of learning object metadata
> (especially UK LOM Core) and applications. I'm also an experienced
> I've done an awful lot of reading of fine manuals, fora and websites.
> a half-decent understanding of XML but am no expert, and know nothing
> about XPath and XSLT.
> Thanks in anticipation for your tolerance and help :)
hbz, Gruppe Portale
- Digitale Bibliothek und Online-Fernleihe -
Postfach 270451, 50510 Köln, Deutschland
Telefon +49-221-40075-156, Fax +49-221-40075-190
[log in to unmask]