Posts Tagged ‘xsd’
Parse XML file into array (PHP)
Nowadays XML-based information storing is increasing its use, so usually you’ll have to parse these files. If you want a PHP function that resolves these needs, take a look at this: <?php /** * xml2array() will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Arguments : $contents [...]
Changing oai_dc output (OAI_PMH DublinCore)
Every OAI-PMH compliant repository has the ability to output records in several formats. To know which formats your repository uses, you can use ?verb=ListMetadataFormats (refer to OAI-PMH verbs for a deeper explanation). For instance, for my repository: http://zaguan.unizar.es/oai2d?verb=ListMetadataFormats <?xml version="1.0" encoding="UTF-8"?> <oai-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> <responseDate>2009-05-27T05:47:01Z</responseDate> <request verb="ListMetadataFormats">http://zaguan.unizar.es/oai2d/</request> <listMetadataFormats> <metadataFormat> <metadataPrefix>oai_dc</metadataPrefix> <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema> <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace> </metadataFormat> [...]