Alistair Leslie-Hughes : msxml: Implement createTextNode.

Alexandre Julliard julliard at winehq.org
Wed Nov 21 07:47:43 CST 2007


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Nov 16 09:55:49 2007 +1100

msxml: Implement createTextNode.

---

 dlls/msxml3/domdoc.c |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 9a1dba7..b4b8962 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -744,8 +744,29 @@ static HRESULT WINAPI domdoc_createTextNode(
     BSTR data,
     IXMLDOMText** text )
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    domdoc *This = impl_from_IXMLDOMDocument2( iface );
+    xmlNodePtr xmlnode;
+    xmlChar *xml_content;
+
+    TRACE("%p->(%s %p)\n", iface, debugstr_w(data), text);
+
+    if(!text)
+        return E_INVALIDARG;
+
+    *text = NULL;
+
+    xml_content = xmlChar_from_wchar((WCHAR*)data);
+    xmlnode = xmlNewText(xml_content);
+    HeapFree(GetProcessHeap(), 0, xml_content);
+
+    if(!xmlnode)
+        return E_FAIL;
+
+    xmlnode->doc = get_doc( This );
+
+    *text = (IXMLDOMText*)create_text(xmlnode);
+
+    return S_OK;
 }
 
 




More information about the wine-cvs mailing list