Iteration on foreach may return FALSE for an element if the XMLReader::expand() returned FALSE for the current element
Check also all functions prior to avoid and allow better error recovering
Merge pull request #2 from eberhm/master

Iteration on foreach may return FALSE for an parse error on expand