Commit bd4361cb authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Implement WsReadStartAttribute.

parent 5eed03cb
......@@ -378,6 +378,7 @@ enum reader_state
READER_STATE_INITIAL,
READER_STATE_BOF,
READER_STATE_STARTELEMENT,
READER_STATE_STARTATTRIBUTE,
READER_STATE_STARTENDELEMENT,
READER_STATE_TEXT,
READER_STATE_ENDELEMENT,
......@@ -393,6 +394,7 @@ struct reader
enum reader_state state;
struct node *root;
struct node *current;
ULONG current_attr;
WS_XML_READER_INPUT_TYPE input_type;
const unsigned char *input_data;
ULONG input_size;
......@@ -1341,6 +1343,28 @@ HRESULT WINAPI WsMoveReader( WS_XML_READER *handle, WS_MOVE_TO move, BOOL *found
return read_move_to( reader, move, found );
}
/**************************************************************************
* WsReadStartAttribute [webservices.@]
*/
HRESULT WINAPI WsReadStartAttribute( WS_XML_READER *handle, ULONG index, WS_ERROR *error )
{
struct reader *reader = (struct reader *)handle;
WS_XML_ELEMENT_NODE *elem;
TRACE( "%p %u %p\n", handle, index, error );
if (error) FIXME( "ignoring error parameter\n" );
if (!reader) return E_INVALIDARG;
elem = &reader->current->hdr;
if (reader->state != READER_STATE_STARTELEMENT || index >= elem->attributeCount)
return WS_E_INVALID_FORMAT;
reader->current_attr = index;
reader->state = READER_STATE_STARTATTRIBUTE;
return S_OK;
}
static WCHAR *xmltext_to_widechar( WS_HEAP *heap, const WS_XML_TEXT *text )
{
WCHAR *ret;
......
......@@ -118,7 +118,7 @@
@ stub WsReadMetadata
@ stdcall WsReadNode(ptr ptr)
@ stub WsReadQualifiedName
@ stub WsReadStartAttribute
@ stdcall WsReadStartAttribute(ptr long ptr)
@ stdcall WsReadStartElement(ptr ptr)
@ stdcall WsReadToStartElement(ptr ptr ptr ptr ptr)
@ stdcall WsReadType(ptr long long ptr long ptr ptr long ptr)
......
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