如图所示,横向放置,我的DOMXpath:evaluate()
中的每件商品都会有$document = new DOMDocument();
$document->loadXml($xml);
$xpath = new DOMXpath($document);
$xpath->registerNamespace('atom', 'http://www.w3.org/2005/Atom');
$xpath->registerNamespace('meta', 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata');
$xpath->registerNamespace('data', 'http://schemas.microsoft.com/ado/2007/08/dataservices');
foreach ($xpath->evaluate('//atom:entry/atom:content/meta:properties') as $properties) {
echo $xpath->evaluate('string(data:Id)', $properties), "\n";
echo $xpath->evaluate('string(data:NEW_DATE)', $properties), "\n\n";
}
和RecyclerView