Extract metadata from an xml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ofuuzo1@yahoo.no

    Extract metadata from an xml

    The below xml is generated when I make a remote call like:

    ?php
    $url = "http://......./oai?
    verb=ListRecord s&metadataPrefi x=frida&set=UUI ";
    $input = @file_get_conte nts($url) or die('Could not access file:
    $url');
    echo $input;
    ?>
    How can I extract only
    <resumptionToke n completeListSiz e="14" cursor="0">set+ UITO+cls
    +14+cursor+3+la st+110547</resumptionToken >

    and put it in a variable?

    Thanks in advance.
    Ofuuzo

    ----------------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <OAI-PMH xmlns="http://www.openarchive s.org/OAI/2.0/"
    xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    schemaLocation= "http://www.openarchive s.org/OAI/2.0/
    http://www.openarchive s.org/OAI/2.0/OAI-PMH.xsd">
    <responseDate>2 008-02-14T12:41:33Z</responseDate>
    .....
    ......
    </record>
    <resumptionToke n completeListSiz e="14" cursor="0">set+ UITO+cls
    +14+cursor+3+la st+110547</resumptionToken >
    </ListRecord>
    </OAI-PMH>
Working...