Fixed possible infinite loop in XmlMarshaller.
Fixed possible infinite loop in XmlMarshaller.

As additional reads from the cursor are done inside the loop it is possbile to fall into infinite loop. XMLReader::read() method returns true on successful read. So instead of reading inside the loop we can do it in a condition.

illuminadigital/php-xml-marshalling,Ocramius/oxm,illuminadigital/php-xml-marshalling,doctrine/oxm,Ocramius/oxm