i have this xml file:
<RecNo_1>
<Field Name="erfdat">19.11.1999</Field>
<Field Name="erfuser">user1</Field>
<Field Name="l_dat">18.12.2014</Field>
<Field Name="l_user">deluser1</Field>
</RecNo_1>
<RecNo_2>
<Field Name="erfdat">22.11.1999</Field>
<Field Name="erfuser">user2</Field>
<Field Name="l_dat">18.12.2015</Field>
<Field Name="l_user">deluser2</Field>
</RecNo_2>
I have tried to get the fields like this:
$xml = simplexml_load_file($xmlFile);
foreach($xml->children() as $ob) {
var_dump($ob->Name["erfdat"]);
}
In my opinion this should output for RecNo_1 "19.11.1999", and for RecNo_2 "22.11.1999". But it outputs nothing... How can I simply get the values?