[09/10] webservices: Implement WS_MOVE_TO_PARENT_ELEMENT in the reader.
Hans Leidekker
hans at codeweavers.com
Wed Feb 10 08:02:07 CST 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/webservices/reader.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 1979ad7..55cd4ac 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -1424,6 +1424,19 @@ static BOOL move_to_end_element( struct reader *reader )
return FALSE;
}
+static BOOL move_to_parent_element( struct reader *reader )
+{
+ struct node *parent = reader->current->parent;
+
+ if (parent && (parent->hdr.node.nodeType == WS_XML_NODE_TYPE_ELEMENT ||
+ parent->hdr.node.nodeType == WS_XML_NODE_TYPE_BOF))
+ {
+ reader->current = parent;
+ return TRUE;
+ }
+ return FALSE;
+}
+
static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found )
{
struct list *ptr;
@@ -1457,6 +1470,10 @@ static HRESULT read_move_to( struct reader *reader, WS_MOVE_TO move, BOOL *found
success = move_to_end_element( reader );
break;
+ case WS_MOVE_TO_PARENT_ELEMENT:
+ success = move_to_parent_element( reader );
+ break;
+
case WS_MOVE_TO_FIRST_NODE:
if ((ptr = list_head( &reader->current->parent->children )))
{
--
2.7.0
More information about the wine-patches
mailing list