View Single Post
Old 11-16-2012, 07:57 PM   PM User | #3
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,386
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
I am getting error due to the od: in the xml file. This maybe your problem.

May I offer an easier method, simplexml. Remove both od: and this does what you want
PHP Code:
<?php
$xml 
simplexml_load_file("PageBox.xml");  // I made your code into a file named People.xml

$i 0;
foreach (
$xml->Page->PageBox as $PageBox[])
{
    if(
$PageBox[$i]->attributes()->BoxType == "TrimBox")
        echo 
"The Width you seek is: ".$PageBox[$i]->attributes()->Width "<br />";
    
$i++;
}
?>
sunfighter is online now   Reply With Quote