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

msxml: Fix for get_nodeValue on attributes.

parent 65707fb9
...@@ -225,10 +225,14 @@ static HRESULT WINAPI xmlnode_get_nodeValue( ...@@ -225,10 +225,14 @@ static HRESULT WINAPI xmlnode_get_nodeValue(
switch ( This->node->type ) switch ( This->node->type )
{ {
case XML_ATTRIBUTE_NODE: case XML_ATTRIBUTE_NODE:
{
xmlChar *content = xmlNodeGetContent(This->node);
V_VT(value) = VT_BSTR; V_VT(value) = VT_BSTR;
V_BSTR(value) = bstr_from_xmlChar( This->node->name ); V_BSTR(value) = bstr_from_xmlChar( content );
xmlFree(content);
r = S_OK; r = S_OK;
break; break;
}
case XML_TEXT_NODE: case XML_TEXT_NODE:
V_VT(value) = VT_BSTR; V_VT(value) = VT_BSTR;
V_BSTR(value) = bstr_from_xmlChar( This->node->content ); V_BSTR(value) = bstr_from_xmlChar( This->node->content );
......
...@@ -404,6 +404,12 @@ void test_domnode( void ) ...@@ -404,6 +404,12 @@ void test_domnode( void )
ok( r == S_OK, "get_baseName returned wrong code\n"); ok( r == S_OK, "get_baseName returned wrong code\n");
ok( lstrcmpW(str,szdl) == 0, "basename was wrong\n"); ok( lstrcmpW(str,szdl) == 0, "basename was wrong\n");
r = IXMLDOMNode_get_nodeValue( node, &var );
ok( r == S_OK, "returns %08lx\n", r );
ok( V_VT(&var) == VT_BSTR, "vt %x\n", V_VT(&var));
ok( !lstrcmpW(V_BSTR(&var), szstr1), "nodeValue incorrect\n");
VariantClear(&var);
r = IXMLDOMNode_get_childNodes( node, NULL ); r = IXMLDOMNode_get_childNodes( node, NULL );
ok( r == E_INVALIDARG, "get_childNodes returned wrong code\n"); ok( r == E_INVALIDARG, "get_childNodes returned wrong code\n");
......
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