[xml] How to continue reading with a xmlTextReader after warning?




Hi all.

I got stuck reading a file with relative URI as xmlns specification, e.g 
xmlns:foo="./bar/[...]". 

On xmlTextReaderRead(), a warning is generated (relative URIs are deprecated) 
and the return value is '-1'. As I know that the files in question contain 
this problem, I'd like to skip this particular error. Subsequent calls to 
xmlTextReaderRead() seem not to advance to any of the later nodes but always 
return '-1'. Thus I assume that one would somehow need to reset the internal 
state of the xmlTextReader after the first return of '-1' - but there seems to 
be no (obvious) way to do so?! Using xmlReadFile(), the same warning is 
issued, but the tree is available afterwards.

This seems to be quite similar to a previous problem [1,2], there the URI was 
empty, not relative?!

Any pointers?

Thanks

        Daniel

[1] http://mail.gnome.org/archives/xml/2005-January/msg00153.html
[2] https://bugzilla.gnome.org/show_bug.cgi?id=164556



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]