forked from prewk/XmlStreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
litwinski/XmlStreamer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
XmlStreamer [email protected] Free for everyone for everything, attribution voluntary ------ Usage: Extend the class and implement the processNode method. Example: class SimpleXmlStreamer extends XmlStreamer { public function processNode($xmlString, $elementName, $nodeIndex) { $xml = simplexml_load_string($xmlString); $something = (string)$xml->Something->SomethingElse->ReadThis; echo "$nodeIndex: Extracted string '$something' from parent node '$elementName'\n"; return true; } } $streamer = new SimpleXmlStreamer("myLargeXmlFile.xml"); if ($streamer->parse()) { echo "Finished successfully"; } else { echo "Couldn't find root node"; }
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published