Structures_DataGrid
[ class tree: Structures_DataGrid ] [ index: Structures_DataGrid ] [ all elements ]

Source for file bind-xml2.php

Documentation is available at bind-xml2.php

  1. <?php
  2. $xml = <<<XML
  3. <response>
  4.   <date>today</date>
  5.   <server>localhost</server>
  6.   <records>
  7.     <record>
  8.       <firstname>Olivier</firstname>
  9.       <lastname>Guilyardi</lastname>
  10.       <city>Paris</city>
  11.       <country>France</country>
  12.     </record>
  13.     <record>
  14.       <firstname>Mark</firstname>
  15.       <lastname>Wiesemann</lastname>
  16.       <city>Aachen</city>
  17.       <country>Germany</country>
  18.     </record>
  19.   </records>
  20. </response>
  21. XML;
  22.  
  23. // Options for the bind() call, using XPath
  24. $options = array('path' => '/response/records/*');
  25.  
  26. // Bind the XML string
  27. $test $datagrid->bind($xml$options'XML');
  28.  
  29. // Print binding error if any
  30. if (PEAR::isError($test)) {
  31.     echo $test->getMessage()
  32. }
  33. ?>

Documentation generated on Mon, 11 Mar 2019 15:47:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.