Re: [xml] Regarding xmlTextReaderNext Api
- From: Petr Pajas <pajas ufal mff cuni cz>
- To: xml gnome org
- Cc: Ashwin <ashwins huawei com>
- Subject: Re: [xml] Regarding xmlTextReaderNext Api
- Date: Fri, 27 Jun 2008 10:48:15 +0200
Hi Ashwin, all,
I think this forgotten post of mine
http://mail.gnome.org/archives/xml/2007-May/msg00104.html
is related.
-- Petr
On st 25. Äervna 2008, Ashwin wrote:
Hi,
I am parsing using the reader walker Api's. While walking the
tree I need to skip the subtree for a certain element, I tried to
use the xmlTextReaderNext API, however it is returning me an
erroneous result, it returns me the child node of the element
whose subtree I want to skip.
This happens because in case of a preparsed document a different
set of Api's are called
if (reader->doc != NULL)
return(xmlTextReaderNextTree(reader)); ------> This API
too should effectively skip the sub-tree, but it does not.
If however I create a reader using xmlReaderForMemory then the
functionality is fine, as it goes to the following part of the
code in xmlTextReaderNext
do {
ret = xmlTextReaderRead(reader);
if (ret != 1)
return(ret);
} while (reader->node != cur);
And returns the node after skipping the sub-tree.
Is this a usage issue or a problem with the implementation of
xmlTextReaderNextTree Api, which is invoked in the case of
pre-parsed documents.
Any pointers would be invaluable and greatly appreciated.
Thanks !!
Regards
Ashwin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]