Hi there,
I'm working with TextReader, and I had some trouble wen playing with
exceptions. In fact it was a problem in read() function.
Here is the thing, when doing:
xmlpp::TextReader reader("example.xml");
while(reader.read())
{
[...]
}
and if the xml file has a parse error, it just fall in an infinite loop
because read() always read the same node.
In fact, according to the xmlTextReaderRead() doc, this function can return -1
if an error occured, and not just a boolean value.
Attached is a patch to make this work and also throw an exception.
--
------------------------
Raoul Hecky
|