X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdll%2Fwin32%2Fmsxml3%2Felement.c;h=5addf338353e3619395640545cb1d53dd76098f5;hp=84a23a5a7a71bc85718d9c7cd71ef783f52eefc1;hb=36c9923227720f45b614c9eb0e6fc5fd532ccc96;hpb=60505b44a7b5b980d882670cefe867afea096b4f diff --git a/reactos/dll/win32/msxml3/element.c b/reactos/dll/win32/msxml3/element.c index 84a23a5a7a7..5addf338353 100644 --- a/reactos/dll/win32/msxml3/element.c +++ b/reactos/dll/win32/msxml3/element.c @@ -1182,7 +1182,9 @@ static HRESULT WINAPI domelem_getAttribute( domelem *This = impl_from_IXMLDOMElement( iface ); xmlNodePtr element; xmlChar *xml_name, *xml_value = NULL; + xmlChar *local, *prefix; HRESULT hr = S_FALSE; + xmlNsPtr ns; TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value); @@ -1201,7 +1203,28 @@ static HRESULT WINAPI domelem_getAttribute( if(!xmlValidateNameValue(xml_name)) hr = E_FAIL; else - xml_value = xmlGetNsProp(element, xml_name, NULL); + { + if ((local = xmlSplitQName2(xml_name, &prefix))) + { + if (xmlStrEqual(prefix, BAD_CAST "xmlns")) + { + ns = xmlSearchNs(element->doc, element, local); + if (ns) + xml_value = xmlStrdup(ns->href); + } + else + { + ns = xmlSearchNs(element->doc, element, prefix); + if (ns) + xml_value = xmlGetNsProp(element, local, ns->href); + } + + xmlFree(prefix); + xmlFree(local); + } + else + xml_value = xmlGetNsProp(element, xml_name, NULL); + } heap_free(xml_name); if(xml_value)