From 459dd11f3f0ea95640da3c6b1344440111bac4a3 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Fri, 17 Nov 2006 14:32:17 +0000 Subject: [PATCH] msxml3: Implement createElement. --- dlls/msxml3/domdoc.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 1314811542b..459e23473c6 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -694,8 +694,25 @@ static HRESULT WINAPI domdoc_createElement( BSTR tagname, IXMLDOMElement** element ) { - FIXME("\n"); - return E_NOTIMPL; + xmlNodePtr xmlnode; + domdoc *This = impl_from_IXMLDOMDocument( iface ); + xmlChar *xml_name; + IUnknown *elem_unk; + HRESULT hr; + + TRACE("%p->(%s,%p)\n", iface, debugstr_w(tagname), element); + + xml_name = xmlChar_from_wchar((WCHAR*)tagname); + xmlnode = xmlNewDocNode(get_doc(This), NULL, xml_name, NULL); + + TRACE("created xmlptr %p\n", xmlnode); + elem_unk = create_element(xmlnode, NULL); + HeapFree(GetProcessHeap(), 0, xml_name); + + hr = IUnknown_QueryInterface(elem_unk, &IID_IXMLDOMElement, (void **)element); + IUnknown_Release(elem_unk); + TRACE("returning %p\n", *element); + return hr; }