mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
msxml3: Return qualified name from get_nodeName().
This commit is contained in:
parent
12bb4a471f
commit
ede880a1c3
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user