get_elements_by_tagname('Details'); foreach($list as $detail) { echo 'DetailsUrl = ' . $detail->get_attribute('url') . '
'; $node = $detail->first_child(); do { if($node->node_name() == 'Authors') { foreach($detail->get_elements_by_tagname('Author') as $author) { $authortext = $author->first_child(); echo 'Author = ' . $authortext->node_value() . '
'; } } else if($node->node_name() == "ProductName") { $productname = $node->first_child(); if($productname != NULL) { echo 'ProductName = ' . $productname->node_value() . '
'; } } else if($node->node_name() == "UsedPrice") { $usedprice = $node->first_child(); if($usedprice != NULL) { echo 'UsedPrice = ' . $usedprice->node_value() . '
'; } } else if($node->node_name() == "ImageUrlSmall") { $imageurlsmall = $node->first_child(); if($imageurlsmall != NULL) { echo 'ImageUrlSmall = ' . $imageurlsmall->node_value() . '
'; } } $node = $node->next_sibling(); } while($node != NULL); echo '====
'; } ?>