webservices: Implement WS_MOVE_TO_CHILD_ELEMENT in the reader.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
36df4893bf
commit
5c4a061f39
|
@ -1380,6 +1380,31 @@ static BOOL move_to_prev_element( struct reader *reader )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL move_to_child_element( struct reader *reader )
|
||||
{
|
||||
struct list *ptr;
|
||||
struct node *node;
|
||||
|
||||
if (!(ptr = list_head( &reader->current->children ))) return FALSE;
|
||||
node = LIST_ENTRY( ptr, struct node, entry );
|
||||
if (node->hdr.node.nodeType == WS_XML_NODE_TYPE_ELEMENT)
|
||||
{
|
||||
reader->current = node;
|
||||
return TRUE;
|
||||
}
|
||||
while ((ptr = list_next( &reader->current->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;
|
||||
|
@ -1405,6 +1430,10 @@ static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found
|
|||
success = move_to_prev_element( reader );
|
||||
break;
|
||||
|
||||
case WS_MOVE_TO_CHILD_ELEMENT:
|
||||
success = move_to_child_element( reader );
|
||||
break;
|
||||
|
||||
case WS_MOVE_TO_FIRST_NODE:
|
||||
if ((ptr = list_head( &reader->current->parent->children )))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue