webservices: Handle text records with implicit end element.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d29c0e2bdf
commit
28dd2e11d4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue