<Pages TotalPages="56" ProductCode="Headline" PubDate="2012-01-31" PubVersion="0" PubSubVersion="0" PageWidth="1622" PageHeight="1902">
<Page PageNo="1" PageName="" PageType="" Section="Section" ThumbnailPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/1/Pv001.png" ImagePath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/1/Pg001_142_p.jpg" OverlayFullPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/1/Pg001_142_t.png" PreviewPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/1/Pg001.png" IsPreview="true" ImageHeight="1902" ImageWidth="1622" WithResource="true" />
<Page PageNo="2" PageName="" PageType="" Section="Section" ThumbnailPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/2/Pv002.png" ImagePath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/2/Pg002_142_p.jpg" OverlayFullPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/2/Pg002_142_t.png" PreviewPath="http://203.80.1.28/FlippingBook/Dev/Frontend/demo/Headline/2012/12/20/0/0/A/Content/2/Pg002.png" IsPreview="true" ImageHeight="1902" ImageWidth="1622" WithResource="true" />
</Pages>
PHP:
$xml = simplexml_load_file($dir)
or die("Error: Cannot create object");
//$fileList = array();
foreach($xml->children() as $Pages){
foreach($Pages->children() as $Page => $page){
$fileLink = $page['ThumbnailPath'];
echo $fileLink;
}
}
我要得到的是来自节点“Page”的 ThumbnailPath,我遍历 Pages 和 page 但结果一无所获,如何解决这个问题?谢谢