File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch11_cURL_to_Interact_with_WebServ/parsexml.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch11_cURL_to_Interact_with_WebServ/parsexml.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch11_cURL_to_Interact_with_WebServ/parsexml.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 1 month ago
Size: 280 bytes
 

Contents

Class file image Download
<?php
$xs
= file_get_contents("foo.xml");
$data = new SimpleXMLElement($xs);

print
$data->sins->sin[0];
print
"\n";
print
$data->sins->sin[1]["type"];
print
"\n";

foreach (
$data->sins->sin as $sin) {
    print
$sin . " : " . $sin["type"];
    print
"\n";
}

print_r($data);

?>

For more information send a message to info at phpclasses dot org.