Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 02ba8d21b8629c7c26ab200593b8d752 > files > 11

php-pear-Structures_DataGrid-0.9.3-2.mga4.noarch.rpm

<?php
$xml = <<<XML
<response>
  <date>today</date>
  <server>localhost</server>
  <records>
    <record>
      <firstname>Olivier</firstname>
      <lastname>Guilyardi</lastname>
      <city>Paris</city>
      <country>France</country>
    </record>
    <record>
      <firstname>Mark</firstname>
      <lastname>Wiesemann</lastname>
      <city>Aachen</city>
      <country>Germany</country>
    </record>
  </records>
</response>
XML;

// Options for the bind() call, using XPath
$options = array('path' => '/response/records/*');

// Bind the XML string
$test = $datagrid->bind($xml, $options, 'XML');

// Print binding error if any
if (PEAR::isError($test)) {
    echo $test->getMessage(); 
}
?>