<assertion xsi:schemaLocation="http://www.imsglobal.org/xsd/imsassert_v1p0 http://www.imsglobal.org/xsd/imsassert_v1p0.xsd http://www.imsglobal.org/xsd/imslip_v1p0 http://www.imsglobal.org/xsd/imslip_v1p0.xsd">
<lip:contentype>
<lip:referential>
<lip:indexid>assertion_01</lip:indexid>
</lip:referential>
</lip:contentype>
<assertion>
el dato que esta en negrita es el que quiero rescatar, el cual lo hace, pero me lanza el siguiente warning:
Warning: simplexml_load_file() [function.simplexml-load-file]: C:/AppServ/www/boxedtype/temp/9531/reflexion.xml:2: parser warning : xmlns:lip: 'http://www.imsglobal.org/xsd/imsreflex_v1p0 http://www.imsglobal.org/xsd/imsreflex_v1p0.xsd http://www.imsglobal.org/xsd/imslip_v1p0 http://www.imsglobal.org/xsd/imslip_v1p0.xsd ' is not a valid URI in C:\AppServ\www\boxedtype\metadatos.php on line 11
Warning: simplexml_load_file() [function.simplexml-load-file]: www.imsglobal.org/xsd/imslip_v1p0 http://www.imsglobal.org/xsd/imslip_v1p0.xsd " in C:\AppServ\www\boxedtype\metadatos.php on line 11
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in C:\AppServ\www\boxedtype\metadatos.php on line 11
aqui les dejo el codigo que utilice para recorrer el xml:
Código PHP:
$xml = simplexml_load_file($ruta."/assertion.xml");
$ns = $xml->getNamespaces(true);
$xml->registerXPathNamespace('c',$ns['lip']);
$contentype = $xml->xpath('//c:indexid');
echo $contentype[0];