} showHtml('/*/organizations/organization/item[1]/title'); showHtml('organizations/organization/item/title'); showHtml('organizations/organization/item/title *'); showHtml('Titles: -% organizations/organization/item/titl , %- .'); // if no elements are found, prefix and postfix are not generated showHtml('Titles: -% organizations/organization/item/title , %- .'); showHtml('<ul><li> -% resources/resource/file/../@identifier </li><li> %- </li></ul>'); showHtml('metadata/lom/general/description/langstring'); echo '<h5>The same, but in a HTML construct:</h5>', $testdoc->xmd_html_value('metadata/lom/general/description/langstring'); function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return (double) $usec + (double) $sec; } $xmlFile = 'imsmanifest_reload.xml'; $presXmlFileContents = @file_get_contents_n($xmlFile) or die('XML file ' . htmlspecialchars($xmlFile) . ' is missing...'); $presXmlFileContents = explode("\n", $presXmlFileContents); $seconds = getmicrotime(); $testdoc2 = new xmddoc($presXmlFileContents); $seconds = getmicrotime() - $seconds; showDoc('Time to parse', $seconds); $seconds = getmicrotime(); $testdoc2->xmd_cache(); $seconds = getmicrotime() - $seconds; showDoc('Time to cache', $seconds); $seconds = getmicrotime(); $testdoc = new xmddoc($testdoc2->names, $testdoc2->numbers, $testdoc2->textstring); $seconds = getmicrotime() - $seconds; showDoc('Time to restore from cache', $seconds); showDoc('OK after restore');