Commit c3687360 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Implement selectSingleNode.

parent 53b4c0f6
...@@ -586,8 +586,19 @@ static HRESULT WINAPI xmlnode_selectSingleNode( ...@@ -586,8 +586,19 @@ static HRESULT WINAPI xmlnode_selectSingleNode(
BSTR queryString, BSTR queryString,
IXMLDOMNode** resultNode) IXMLDOMNode** resultNode)
{ {
FIXME("\n"); xmlnode *This = impl_from_IXMLDOMNode( iface );
return E_NOTIMPL; IXMLDOMNodeList *list;
HRESULT r;
TRACE("%p %s %p\n", This, debugstr_w(queryString), resultNode );
r = IXMLDOMNode_selectNodes(iface, queryString, &list);
if(SUCCEEDED(r))
{
r = IXMLDOMNodeList_nextNode(list, resultNode);
IXMLDOMNodeList_Release(list);
}
return r;
} }
static HRESULT WINAPI xmlnode_get_parsed( static HRESULT WINAPI xmlnode_get_parsed(
......
...@@ -447,6 +447,13 @@ void test_domnode( void ) ...@@ -447,6 +447,13 @@ void test_domnode( void )
else else
ok( FALSE, "no element\n"); ok( FALSE, "no element\n");
r = IXMLDOMNode_selectSingleNode( element, (BSTR)szdl, &node );
ok( r == S_FALSE, "ret %08lx\n", r );
r = IXMLDOMNode_selectSingleNode( element, (BSTR)szbs, &node );
ok( r == S_OK, "ret %08lx\n", r );
r = IXMLDOMNode_Release( node );
ok( r == 0, "ret %08lx\n", r );
if (list) if (list)
{ {
r = IXMLDOMNodeList_get_length( list, &count ); r = IXMLDOMNodeList_get_length( list, &count );
......
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