You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by ww...@eecs.umich.edu on 2000/12/06 20:41:56 UTC

Tree Traversal

    I have a question about the tree traversal. Let us 
assume we have the following text:

<tag>documentation</tag>
<value>a=1</value>

I have the following program:
DOM_Node *p;  // assuming it points to <tag>documentation</tag>
DOM_Node *q;  // to get the node for <value>a=1</value>

q = p.getNextSibling().getNextSibling();

But this does not work for <tag>documentation</tag><value>a=1</value>.
It seems to me the next sibling of <tag> is newline whose next sibling
is <value>. Could someone tell whether I can use any existing function
to deal with the both cases to replace, or other suggestions? Thanks.
best,
wuwei