Processing XML with PHP - Read the XML Document
(Page 5 of 6 )
Once the framework has been set up for the parser, it's time to read the XML document. This is accomplished by opening the file for standard reading and passing the information to the xml_parse function. Like the other functions, xml_parse first expects the parser handle.
<?php $document = file("sample.xml");
foreach ($document as $line) { xml_parse($parser, $line); } ?> |
Next: Conclusion >>
More Miscellaneous Articles
More By bluephoenix