Commit 28dd2e11 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Handle text records with implicit end element.

parent d29c0e2b
......@@ -2171,6 +2171,7 @@ static HRESULT read_text_bin( struct reader *reader )
}
}
if (type & 1) node->flags |= NODE_FLAG_TEXT_WITH_IMPLICIT_END_ELEMENT;
read_insert_node( reader, parent, node );
reader->state = READER_STATE_TEXT;
reader->text_conv_offset = 0;
......@@ -2349,9 +2350,11 @@ static HRESULT read_endelement_bin( struct reader *reader )
unsigned char type;
HRESULT hr;
if ((hr = read_byte( reader, &type )) != S_OK) return hr;
if (type != RECORD_ENDELEMENT) return WS_E_INVALID_FORMAT;
if (!(reader->current->flags & NODE_FLAG_TEXT_WITH_IMPLICIT_END_ELEMENT))
{
if ((hr = read_byte( reader, &type )) != S_OK) return hr;
if (type != RECORD_ENDELEMENT) return WS_E_INVALID_FORMAT;
}
if (!(parent = find_parent( reader ))) return WS_E_INVALID_FORMAT;
reader->current = LIST_ENTRY( list_tail( &parent->children ), struct node, entry );
......@@ -2559,7 +2562,7 @@ static HRESULT read_node_bin( struct reader *reader )
unsigned char type;
HRESULT hr;
if (node_type( reader->current ) == WS_XML_NODE_TYPE_TEXT)
if (reader->current->flags & NODE_FLAG_TEXT_WITH_IMPLICIT_END_ELEMENT)
{
reader->current = LIST_ENTRY( list_tail( &reader->current->parent->children ), struct node, entry );
reader->last = reader->current;
......
......@@ -81,6 +81,7 @@ HRESULT read_output_params( WS_XML_READER *, WS_HEAP *, const WS_ELEMENT_DESCRIP
enum node_flag
{
NODE_FLAG_IGNORE_TRAILING_ELEMENT_CONTENT = 0x1,
NODE_FLAG_TEXT_WITH_IMPLICIT_END_ELEMENT = 0x2,
};
struct node
......
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