Commit 9b58a399 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Implement WS_MOVE_TO_NEXT_ELEMENT in the reader.

parent d2ecd869
......@@ -1344,6 +1344,24 @@ static BOOL move_to_root_element( struct reader *reader )
return FALSE;
}
static BOOL move_to_next_element( struct reader *reader )
{
struct list *ptr;
struct node *node = reader->current;
while ((ptr = list_next( &node->parent->children, &node->entry )))
{
struct node *next = LIST_ENTRY( ptr, struct node, entry );
if (next->hdr.node.nodeType == WS_XML_NODE_TYPE_ELEMENT)
{
reader->current = next;
return TRUE;
}
node = next;
}
return FALSE;
}
static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found )
{
struct list *ptr;
......@@ -1361,6 +1379,10 @@ static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found
success = move_to_root_element( reader );
break;
case WS_MOVE_TO_NEXT_ELEMENT:
success = move_to_next_element( reader );
break;
case WS_MOVE_TO_FIRST_NODE:
if ((ptr = list_head( &reader->current->parent->children )))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment