diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 1df7331a638..38102ecb912 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -128,12 +128,33 @@ xmlnode *get_node_obj(IXMLDOMNode *node) HRESULT node_get_nodeName(xmlnode *This, BSTR *name) { + BSTR prefix, base; + HRESULT hr; + if (!name) return E_INVALIDARG; - *name = bstr_from_xmlChar(This->node->name); - if (!*name) - return S_FALSE; + hr = node_get_base_name(This, &base); + if (hr != S_OK) return hr; + + hr = node_get_prefix(This, &prefix); + if (hr == S_OK) + { + static const WCHAR colW = ':'; + WCHAR *ptr; + + /* +1 for ':' */ + ptr = *name = SysAllocStringLen(NULL, SysStringLen(base) + SysStringLen(prefix) + 1); + memcpy(ptr, prefix, SysStringByteLen(prefix)); + ptr += SysStringLen(prefix); + memcpy(ptr++, &colW, sizeof(WCHAR)); + memcpy(ptr, base, SysStringByteLen(base)); + + SysFreeString(base); + SysFreeString(prefix); + } + else + *name = base; return S_OK; } diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 699382f5252..3999b9501fa 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -7009,7 +7009,7 @@ static void test_namespaces(void) hr = IXMLDOMNode_get_nodeName(node2, &str); EXPECT_HR(hr, S_OK); - todo_wine ok(!lstrcmpW( str, _bstr_("Model:Package")), "got %s\n", wine_dbgstr_w(str)); + ok(!lstrcmpW( str, _bstr_("Model:Package")), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); /* Test get_namespaceURI */ @@ -7030,7 +7030,7 @@ static void test_namespaces(void) hr = IXMLDOMAttribute_get_nodeName(attr, &str); EXPECT_HR(hr, S_OK); - todo_wine ok(!lstrcmpW( str, _bstr_("Model:name2")), "got %s\n", wine_dbgstr_w(str)); + ok(!lstrcmpW( str, _bstr_("Model:name2")), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); hr = IXMLDOMAttribute_get_prefix(attr, &str);