Advertisement
bioforge91

Untitled

Mar 30th, 2015
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. $file = APP_DIR .'/test.xml';
  2.  
  3. $xml = simplexml_load_file($file, NULL, NULL, "http://schemas.xmlsoap.org/soap/envelope/");
  4. $ns = $xml->getNamespaces(true);
  5. $soap = $xml->children($ns['soap']);
  6. $res = $soap->Body->children($ns['m']);
  7.  
  8. foreach ($res->xpath('//Schedule') as $item) {
  9.  
  10.     foreach ($item->Name->Groups->Group as $group ) {
  11.         print_r($group->Code->__toString());
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement