So im not sure what or how to really describe what i need but hopefully someone will understand.
single element of the total xml file looks like this:
for
$xml = simplexml_load_file("books.xml")
or die("Error: Cannot create object");
foreach($xml->children() as $books){
foreach($books->children() as $book => $data){
echo $data->id;
echo $data->title;
echo $data->author;
echo "<br />";
}
}
Assuming your Event nodes have one parent (ie <Events><Event>...</Event><Event>...</Event></Events>
):
$xml = simplexml_load_file($file_xml);
foreach($xml->Event as $event) {
$idAttr = 'ID';
$event_id = (string) $event->attributes()->$idAttr;
$venue_id = (string) $event->Venue->attributes()->$idAttr;
$venue_img_2 = (string) $event->Venue->Image->Url;
}