Commit 12bb4a47 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Fix get_namespaceURI().

parent 588f27da
...@@ -1054,18 +1054,15 @@ HRESULT node_select_singlenode(const xmlnode *This, BSTR query, IXMLDOMNode **no ...@@ -1054,18 +1054,15 @@ HRESULT node_select_singlenode(const xmlnode *This, BSTR query, IXMLDOMNode **no
HRESULT node_get_namespaceURI(xmlnode *This, BSTR *namespaceURI) HRESULT node_get_namespaceURI(xmlnode *This, BSTR *namespaceURI)
{ {
xmlNsPtr *ns; xmlNsPtr ns = This->node->ns;
if(!namespaceURI) if(!namespaceURI)
return E_INVALIDARG; return E_INVALIDARG;
*namespaceURI = NULL; *namespaceURI = NULL;
if ((ns = xmlGetNsList(This->node->doc, This->node))) if (ns && ns->href)
{ *namespaceURI = bstr_from_xmlChar(ns->href);
if (ns[0]->href) *namespaceURI = bstr_from_xmlChar( ns[0]->href );
xmlFree(ns);
}
TRACE("uri: %s\n", debugstr_w(*namespaceURI)); TRACE("uri: %s\n", debugstr_w(*namespaceURI));
......
...@@ -8712,10 +8712,8 @@ static void test_get_prefix(void) ...@@ -8712,10 +8712,8 @@ static void test_get_prefix(void)
str = (void*)0xdeadbeef; str = (void*)0xdeadbeef;
hr = IXMLDOMElement_get_namespaceURI(element, &str); hr = IXMLDOMElement_get_namespaceURI(element, &str);
todo_wine {
EXPECT_HR(hr, S_FALSE); EXPECT_HR(hr, S_FALSE);
ok(str == NULL, "got %s\n", wine_dbgstr_w(str)); ok(str == NULL, "got %s\n", wine_dbgstr_w(str));
}
IXMLDOMDocument_Release(doc); IXMLDOMDocument_Release(doc);
free_bstrs(); free_bstrs();
......
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