Commit 88e53782 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Implement WS_MOVE_TO_END_ELEMENT in the reader.

parent 5c4a061f
......@@ -1405,6 +1405,25 @@ static BOOL move_to_child_element( struct reader *reader )
return FALSE;
}
static BOOL move_to_end_element( struct reader *reader )
{
struct list *ptr;
struct node *node = reader->current;
if (node->hdr.node.nodeType != WS_XML_NODE_TYPE_ELEMENT) return FALSE;
if ((ptr = list_tail( &node->children )))
{
struct node *tail = LIST_ENTRY( ptr, struct node, entry );
if (tail->hdr.node.nodeType == WS_XML_NODE_TYPE_END_ELEMENT)
{
reader->current = tail;
return TRUE;
}
}
return FALSE;
}
static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found )
{
struct list *ptr;
......@@ -1434,6 +1453,10 @@ static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found
success = move_to_child_element( reader );
break;
case WS_MOVE_TO_END_ELEMENT:
success = move_to_end_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