Nikolay Sivov : msxml3: Allow to create dummy node map for <?xml ?>.

Alexandre Julliard julliard at winehq.org
Mon Mar 28 14:22:01 CDT 2011


Module: wine
Branch: master
Commit: 64e5a6a2576ea784a9df204c78f0593fbda2b267
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=64e5a6a2576ea784a9df204c78f0593fbda2b267

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Mar 27 00:17:01 2011 +0300

msxml3: Allow to create dummy node map for <?xml ?>.

---

 dlls/msxml3/pi.c           |    5 +++--
 dlls/msxml3/tests/domdoc.c |    9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
index 89b2b5a..302aea2 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -333,9 +333,10 @@ static HRESULT WINAPI dom_pi_get_attributes(
 
     if (!strcmpW(name, xmlW))
     {
-        FIXME("not implemented for <?xml..?> declaration\n");
+        FIXME("created dummy map for <?xml ?>\n");
+        *map = create_nodemap(This->node.node);
         SysFreeString(name);
-        return E_NOTIMPL;
+        return S_OK;
     }
 
     SysFreeString(name);
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index cdba14b..75fec54 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -9714,9 +9714,14 @@ static void test_get_attributes(void)
     ok(hr == S_OK, "got %08x\n", hr);
 
     hr = IXMLDOMNode_get_attributes(node, &map);
-    todo_wine ok(hr == S_OK, "got %08x\n", hr);
+    ok(hr == S_OK, "got %08x\n", hr);
+
+    length = -1;
+    hr = IXMLDOMNamedNodeMap_get_length(map, &length);
+    EXPECT_HR(hr, S_OK);
+    todo_wine ok(length == 1, "got %d\n", length);
 
-    if (hr == S_OK)
+    if (hr == S_OK && length == 1)
     {
         IXMLDOMAttribute *attr;
         DOMNodeType type;




More information about the wine-cvs mailing list