ddraw/tests: Move the capability tests for enumerated devices.
[wine.git] / dlls / msxml3 / comment.c
blob3ac7ed604eacb4584f359ba203880f9831ee31ef
1 /*
2 * DOM comment node implementation
4 * Copyright 2006 Huw Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define COBJMACROS
23 #include <stdarg.h>
24 #include <libxml/parser.h>
25 #include <libxml/xmlerror.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winuser.h"
30 #include "ole2.h"
31 #include "msxml6.h"
33 #include "msxml_private.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
39 typedef struct _domcomment
41 xmlnode node;
42 IXMLDOMComment IXMLDOMComment_iface;
43 LONG ref;
44 } domcomment;
46 static const tid_t domcomment_se_tids[] = {
47 IXMLDOMNode_tid,
48 IXMLDOMComment_tid,
49 NULL_tid
52 static inline domcomment *impl_from_IXMLDOMComment( IXMLDOMComment *iface )
54 return CONTAINING_RECORD(iface, domcomment, IXMLDOMComment_iface);
57 static HRESULT WINAPI domcomment_QueryInterface(
58 IXMLDOMComment *iface,
59 REFIID riid,
60 void** ppvObject )
62 domcomment *This = impl_from_IXMLDOMComment( iface );
63 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
65 if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
66 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
67 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
68 IsEqualGUID( riid, &IID_IDispatch ) ||
69 IsEqualGUID( riid, &IID_IUnknown ) )
71 *ppvObject = iface;
73 else if(node_query_interface(&This->node, riid, ppvObject))
75 return *ppvObject ? S_OK : E_NOINTERFACE;
77 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
79 return node_create_supporterrorinfo(domcomment_se_tids, ppvObject);
81 else
83 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
84 *ppvObject = NULL;
85 return E_NOINTERFACE;
88 IXMLDOMComment_AddRef(iface);
89 return S_OK;
92 static ULONG WINAPI domcomment_AddRef(IXMLDOMComment *iface)
94 domcomment *comment = impl_from_IXMLDOMComment(iface);
95 ULONG ref = InterlockedIncrement(&comment->ref);
96 TRACE("%p, refcount %lu.\n", iface, ref);
97 return ref;
100 static ULONG WINAPI domcomment_Release(IXMLDOMComment *iface)
102 domcomment *comment = impl_from_IXMLDOMComment(iface);
103 ULONG ref = InterlockedDecrement(&comment->ref);
105 TRACE("%p, refcount %lu.\n", iface, ref);
107 if (!ref)
109 destroy_xmlnode(&comment->node);
110 heap_free(comment);
113 return ref;
116 static HRESULT WINAPI domcomment_GetTypeInfoCount(
117 IXMLDOMComment *iface,
118 UINT* pctinfo )
120 domcomment *This = impl_from_IXMLDOMComment( iface );
121 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
124 static HRESULT WINAPI domcomment_GetTypeInfo(
125 IXMLDOMComment *iface,
126 UINT iTInfo, LCID lcid,
127 ITypeInfo** ppTInfo )
129 domcomment *This = impl_from_IXMLDOMComment( iface );
130 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
131 iTInfo, lcid, ppTInfo);
134 static HRESULT WINAPI domcomment_GetIDsOfNames(
135 IXMLDOMComment *iface,
136 REFIID riid, LPOLESTR* rgszNames,
137 UINT cNames, LCID lcid, DISPID* rgDispId )
139 domcomment *This = impl_from_IXMLDOMComment( iface );
140 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
141 riid, rgszNames, cNames, lcid, rgDispId);
144 static HRESULT WINAPI domcomment_Invoke(
145 IXMLDOMComment *iface,
146 DISPID dispIdMember, REFIID riid, LCID lcid,
147 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
148 EXCEPINFO* pExcepInfo, UINT* puArgErr )
150 domcomment *This = impl_from_IXMLDOMComment( iface );
151 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
152 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
155 static HRESULT WINAPI domcomment_get_nodeName(
156 IXMLDOMComment *iface,
157 BSTR* p )
159 domcomment *This = impl_from_IXMLDOMComment( iface );
161 static const WCHAR commentW[] = {'#','c','o','m','m','e','n','t',0};
163 TRACE("(%p)->(%p)\n", This, p);
165 return return_bstr(commentW, p);
168 static HRESULT WINAPI domcomment_get_nodeValue(
169 IXMLDOMComment *iface,
170 VARIANT* value)
172 domcomment *This = impl_from_IXMLDOMComment( iface );
174 TRACE("(%p)->(%p)\n", This, value);
176 return node_get_content(&This->node, value);
179 static HRESULT WINAPI domcomment_put_nodeValue(
180 IXMLDOMComment *iface,
181 VARIANT value)
183 domcomment *This = impl_from_IXMLDOMComment( iface );
185 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
187 return node_put_value(&This->node, &value);
190 static HRESULT WINAPI domcomment_get_nodeType(
191 IXMLDOMComment *iface,
192 DOMNodeType* domNodeType )
194 domcomment *This = impl_from_IXMLDOMComment( iface );
196 TRACE("(%p)->(%p)\n", This, domNodeType);
198 *domNodeType = NODE_COMMENT;
199 return S_OK;
202 static HRESULT WINAPI domcomment_get_parentNode(
203 IXMLDOMComment *iface,
204 IXMLDOMNode** parent )
206 domcomment *This = impl_from_IXMLDOMComment( iface );
208 TRACE("(%p)->(%p)\n", This, parent);
210 return node_get_parent(&This->node, parent);
213 static HRESULT WINAPI domcomment_get_childNodes(
214 IXMLDOMComment *iface,
215 IXMLDOMNodeList** outList)
217 domcomment *This = impl_from_IXMLDOMComment( iface );
219 TRACE("(%p)->(%p)\n", This, outList);
221 return node_get_child_nodes(&This->node, outList);
224 static HRESULT WINAPI domcomment_get_firstChild(
225 IXMLDOMComment *iface,
226 IXMLDOMNode** domNode)
228 domcomment *This = impl_from_IXMLDOMComment( iface );
230 TRACE("(%p)->(%p)\n", This, domNode);
232 return return_null_node(domNode);
235 static HRESULT WINAPI domcomment_get_lastChild(
236 IXMLDOMComment *iface,
237 IXMLDOMNode** domNode)
239 domcomment *This = impl_from_IXMLDOMComment( iface );
241 TRACE("(%p)->(%p)\n", This, domNode);
243 return return_null_node(domNode);
246 static HRESULT WINAPI domcomment_get_previousSibling(
247 IXMLDOMComment *iface,
248 IXMLDOMNode** domNode)
250 domcomment *This = impl_from_IXMLDOMComment( iface );
252 TRACE("(%p)->(%p)\n", This, domNode);
254 return node_get_previous_sibling(&This->node, domNode);
257 static HRESULT WINAPI domcomment_get_nextSibling(
258 IXMLDOMComment *iface,
259 IXMLDOMNode** domNode)
261 domcomment *This = impl_from_IXMLDOMComment( iface );
263 TRACE("(%p)->(%p)\n", This, domNode);
265 return node_get_next_sibling(&This->node, domNode);
268 static HRESULT WINAPI domcomment_get_attributes(
269 IXMLDOMComment *iface,
270 IXMLDOMNamedNodeMap** attributeMap)
272 domcomment *This = impl_from_IXMLDOMComment( iface );
274 TRACE("(%p)->(%p)\n", This, attributeMap);
276 return return_null_ptr((void**)attributeMap);
279 static HRESULT WINAPI domcomment_insertBefore(
280 IXMLDOMComment *iface,
281 IXMLDOMNode* newNode, VARIANT refChild,
282 IXMLDOMNode** outOldNode)
284 domcomment *This = impl_from_IXMLDOMComment( iface );
286 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
288 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
291 static HRESULT WINAPI domcomment_replaceChild(
292 IXMLDOMComment *iface,
293 IXMLDOMNode* newNode,
294 IXMLDOMNode* oldNode,
295 IXMLDOMNode** outOldNode)
297 domcomment *This = impl_from_IXMLDOMComment( iface );
299 FIXME("(%p)->(%p %p %p) needs tests\n", This, newNode, oldNode, outOldNode);
301 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
304 static HRESULT WINAPI domcomment_removeChild(
305 IXMLDOMComment *iface,
306 IXMLDOMNode *child, IXMLDOMNode **oldChild)
308 domcomment *This = impl_from_IXMLDOMComment( iface );
309 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
310 return node_remove_child(&This->node, child, oldChild);
313 static HRESULT WINAPI domcomment_appendChild(
314 IXMLDOMComment *iface,
315 IXMLDOMNode *child, IXMLDOMNode **outChild)
317 domcomment *This = impl_from_IXMLDOMComment( iface );
318 TRACE("(%p)->(%p %p)\n", This, child, outChild);
319 return node_append_child(&This->node, child, outChild);
322 static HRESULT WINAPI domcomment_hasChildNodes(
323 IXMLDOMComment *iface,
324 VARIANT_BOOL *ret)
326 domcomment *This = impl_from_IXMLDOMComment( iface );
327 TRACE("(%p)->(%p)\n", This, ret);
328 return return_var_false(ret);
331 static HRESULT WINAPI domcomment_get_ownerDocument(
332 IXMLDOMComment *iface,
333 IXMLDOMDocument **doc)
335 domcomment *This = impl_from_IXMLDOMComment( iface );
336 TRACE("(%p)->(%p)\n", This, doc);
337 return node_get_owner_doc(&This->node, doc);
340 static HRESULT WINAPI domcomment_cloneNode(
341 IXMLDOMComment *iface,
342 VARIANT_BOOL deep, IXMLDOMNode** outNode)
344 domcomment *This = impl_from_IXMLDOMComment( iface );
345 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
346 return node_clone( &This->node, deep, outNode );
349 static HRESULT WINAPI domcomment_get_nodeTypeString(
350 IXMLDOMComment *iface,
351 BSTR* p)
353 domcomment *This = impl_from_IXMLDOMComment( iface );
354 static const WCHAR commentW[] = {'c','o','m','m','e','n','t',0};
356 TRACE("(%p)->(%p)\n", This, p);
358 return return_bstr(commentW, p);
361 static HRESULT WINAPI domcomment_get_text(
362 IXMLDOMComment *iface,
363 BSTR* p)
365 domcomment *This = impl_from_IXMLDOMComment( iface );
366 TRACE("(%p)->(%p)\n", This, p);
367 return node_get_text(&This->node, p);
370 static HRESULT WINAPI domcomment_put_text(
371 IXMLDOMComment *iface,
372 BSTR p)
374 domcomment *This = impl_from_IXMLDOMComment( iface );
375 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
376 return node_put_text( &This->node, p );
379 static HRESULT WINAPI domcomment_get_specified(
380 IXMLDOMComment *iface,
381 VARIANT_BOOL* isSpecified)
383 domcomment *This = impl_from_IXMLDOMComment( iface );
384 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
385 *isSpecified = VARIANT_TRUE;
386 return S_OK;
389 static HRESULT WINAPI domcomment_get_definition(
390 IXMLDOMComment *iface,
391 IXMLDOMNode** definitionNode)
393 domcomment *This = impl_from_IXMLDOMComment( iface );
394 FIXME("(%p)->(%p)\n", This, definitionNode);
395 return E_NOTIMPL;
398 static HRESULT WINAPI domcomment_get_nodeTypedValue(
399 IXMLDOMComment *iface,
400 VARIANT* v)
402 domcomment *This = impl_from_IXMLDOMComment( iface );
403 TRACE("(%p)->(%p)\n", This, v);
404 return node_get_content(&This->node, v);
407 static HRESULT WINAPI domcomment_put_nodeTypedValue(
408 IXMLDOMComment *iface,
409 VARIANT typedValue)
411 domcomment *This = impl_from_IXMLDOMComment( iface );
412 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
413 return E_NOTIMPL;
416 static HRESULT WINAPI domcomment_get_dataType(
417 IXMLDOMComment *iface,
418 VARIANT* typename)
420 domcomment *This = impl_from_IXMLDOMComment( iface );
421 TRACE("(%p)->(%p)\n", This, typename);
422 return return_null_var( typename );
425 static HRESULT WINAPI domcomment_put_dataType(
426 IXMLDOMComment *iface,
427 BSTR p)
429 domcomment *This = impl_from_IXMLDOMComment( iface );
431 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
433 if(!p)
434 return E_INVALIDARG;
436 return E_FAIL;
439 static HRESULT WINAPI domcomment_get_xml(
440 IXMLDOMComment *iface,
441 BSTR* p)
443 domcomment *This = impl_from_IXMLDOMComment( iface );
445 TRACE("(%p)->(%p)\n", This, p);
447 return node_get_xml(&This->node, FALSE, p);
450 static HRESULT WINAPI domcomment_transformNode(
451 IXMLDOMComment *iface,
452 IXMLDOMNode *node, BSTR *p)
454 domcomment *This = impl_from_IXMLDOMComment( iface );
455 TRACE("(%p)->(%p %p)\n", This, node, p);
456 return node_transform_node(&This->node, node, p);
459 static HRESULT WINAPI domcomment_selectNodes(
460 IXMLDOMComment *iface,
461 BSTR p, IXMLDOMNodeList** outList)
463 domcomment *This = impl_from_IXMLDOMComment( iface );
464 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
465 return node_select_nodes(&This->node, p, outList);
468 static HRESULT WINAPI domcomment_selectSingleNode(
469 IXMLDOMComment *iface,
470 BSTR p, IXMLDOMNode** outNode)
472 domcomment *This = impl_from_IXMLDOMComment( iface );
473 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
474 return node_select_singlenode(&This->node, p, outNode);
477 static HRESULT WINAPI domcomment_get_parsed(
478 IXMLDOMComment *iface,
479 VARIANT_BOOL* isParsed)
481 domcomment *This = impl_from_IXMLDOMComment( iface );
482 FIXME("(%p)->(%p) stub!\n", This, isParsed);
483 *isParsed = VARIANT_TRUE;
484 return S_OK;
487 static HRESULT WINAPI domcomment_get_namespaceURI(
488 IXMLDOMComment *iface,
489 BSTR* p)
491 domcomment *This = impl_from_IXMLDOMComment( iface );
492 TRACE("(%p)->(%p)\n", This, p);
493 return node_get_namespaceURI(&This->node, p);
496 static HRESULT WINAPI domcomment_get_prefix(
497 IXMLDOMComment *iface,
498 BSTR* prefix)
500 domcomment *This = impl_from_IXMLDOMComment( iface );
501 TRACE("(%p)->(%p)\n", This, prefix);
502 return return_null_bstr( prefix );
505 static HRESULT WINAPI domcomment_get_baseName(
506 IXMLDOMComment *iface,
507 BSTR* name)
509 domcomment *This = impl_from_IXMLDOMComment( iface );
510 TRACE("(%p)->(%p)\n", This, name);
511 return return_null_bstr( name );
514 static HRESULT WINAPI domcomment_transformNodeToObject(
515 IXMLDOMComment *iface,
516 IXMLDOMNode* domNode, VARIANT var1)
518 domcomment *This = impl_from_IXMLDOMComment( iface );
519 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
520 return E_NOTIMPL;
523 static HRESULT WINAPI domcomment_get_data(
524 IXMLDOMComment *iface,
525 BSTR *p)
527 domcomment *This = impl_from_IXMLDOMComment( iface );
528 HRESULT hr;
529 VARIANT vRet;
531 TRACE("(%p)->(%p)\n", This, p);
533 if(!p)
534 return E_INVALIDARG;
536 hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
537 if(hr == S_OK)
539 *p = V_BSTR(&vRet);
542 return hr;
545 static HRESULT WINAPI domcomment_put_data(
546 IXMLDOMComment *iface,
547 BSTR data)
549 domcomment *This = impl_from_IXMLDOMComment( iface );
550 TRACE("(%p)->(%s)\n", This, debugstr_w(data));
551 return node_set_content(&This->node, data);
554 static HRESULT WINAPI domcomment_get_length(
555 IXMLDOMComment *iface,
556 LONG *len)
558 domcomment *This = impl_from_IXMLDOMComment( iface );
559 HRESULT hr;
560 BSTR data;
562 TRACE("(%p)->(%p)\n", This, len);
564 if(!len)
565 return E_INVALIDARG;
567 hr = IXMLDOMComment_get_data(iface, &data);
568 if(hr == S_OK)
570 *len = SysStringLen(data);
571 SysFreeString(data);
574 return hr;
577 static HRESULT WINAPI domcomment_substringData(IXMLDOMComment *iface, LONG offset, LONG count, BSTR *p)
579 HRESULT hr;
580 BSTR data;
582 TRACE("%p, %ld, %ld, %p.\n", iface, offset, count, p);
584 if(!p)
585 return E_INVALIDARG;
587 *p = NULL;
588 if(offset < 0 || count < 0)
589 return E_INVALIDARG;
591 if(count == 0)
592 return S_FALSE;
594 hr = IXMLDOMComment_get_data(iface, &data);
595 if(hr == S_OK)
597 LONG len = SysStringLen(data);
599 if(offset < len)
601 if(offset + count > len)
602 *p = SysAllocString(&data[offset]);
603 else
604 *p = SysAllocStringLen(&data[offset], count);
606 else
607 hr = S_FALSE;
609 SysFreeString(data);
612 return hr;
615 static HRESULT WINAPI domcomment_appendData(
616 IXMLDOMComment *iface,
617 BSTR p)
619 domcomment *This = impl_from_IXMLDOMComment( iface );
620 HRESULT hr;
621 BSTR data;
622 LONG p_len;
624 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
626 /* Nothing to do if NULL or an Empty string passed in. */
627 if((p_len = SysStringLen(p)) == 0) return S_OK;
629 hr = IXMLDOMComment_get_data(iface, &data);
630 if(hr == S_OK)
632 LONG len = SysStringLen(data);
633 BSTR str = SysAllocStringLen(NULL, p_len + len);
635 memcpy(str, data, len*sizeof(WCHAR));
636 memcpy(&str[len], p, p_len*sizeof(WCHAR));
637 str[len+p_len] = 0;
639 hr = IXMLDOMComment_put_data(iface, str);
641 SysFreeString(str);
642 SysFreeString(data);
645 return hr;
648 static HRESULT WINAPI domcomment_insertData(
649 IXMLDOMComment *iface,
650 LONG offset, BSTR p)
652 HRESULT hr;
653 BSTR data;
654 LONG p_len;
656 TRACE("%p, %ld, %s.\n", iface, offset, debugstr_w(p));
658 /* If have a NULL or empty string, don't do anything. */
659 if((p_len = SysStringLen(p)) == 0)
660 return S_OK;
662 if(offset < 0)
664 return E_INVALIDARG;
667 hr = IXMLDOMComment_get_data(iface, &data);
668 if(hr == S_OK)
670 LONG len = SysStringLen(data);
671 BSTR str;
673 if(len < offset)
675 SysFreeString(data);
676 return E_INVALIDARG;
679 str = SysAllocStringLen(NULL, len + p_len);
680 /* start part, supplied string and end part */
681 memcpy(str, data, offset*sizeof(WCHAR));
682 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
683 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
684 str[len+p_len] = 0;
686 hr = IXMLDOMComment_put_data(iface, str);
688 SysFreeString(str);
689 SysFreeString(data);
692 return hr;
695 static HRESULT WINAPI domcomment_deleteData(
696 IXMLDOMComment *iface,
697 LONG offset, LONG count)
699 HRESULT hr;
700 LONG len = -1;
701 BSTR str;
703 TRACE("%p, %ld, %ld.\n", iface, offset, count);
705 hr = IXMLDOMComment_get_length(iface, &len);
706 if(hr != S_OK) return hr;
708 if((offset < 0) || (offset > len) || (count < 0))
709 return E_INVALIDARG;
711 if(len == 0) return S_OK;
713 /* cutting start or end */
714 if((offset == 0) || ((count + offset) >= len))
716 if(offset == 0)
717 IXMLDOMComment_substringData(iface, count, len - count, &str);
718 else
719 IXMLDOMComment_substringData(iface, 0, offset, &str);
720 hr = IXMLDOMComment_put_data(iface, str);
722 else
723 /* cutting from the inside */
725 BSTR str_end;
727 IXMLDOMComment_substringData(iface, 0, offset, &str);
728 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
730 hr = IXMLDOMComment_put_data(iface, str);
731 if(hr == S_OK)
732 hr = IXMLDOMComment_appendData(iface, str_end);
734 SysFreeString(str_end);
737 SysFreeString(str);
739 return hr;
742 static HRESULT WINAPI domcomment_replaceData(
743 IXMLDOMComment *iface,
744 LONG offset, LONG count, BSTR p)
746 HRESULT hr;
748 TRACE("%p, %ld, %ld, %s.\n", iface, offset, count, debugstr_w(p));
750 hr = IXMLDOMComment_deleteData(iface, offset, count);
752 if (hr == S_OK)
753 hr = IXMLDOMComment_insertData(iface, offset, p);
755 return hr;
758 static const struct IXMLDOMCommentVtbl domcomment_vtbl =
760 domcomment_QueryInterface,
761 domcomment_AddRef,
762 domcomment_Release,
763 domcomment_GetTypeInfoCount,
764 domcomment_GetTypeInfo,
765 domcomment_GetIDsOfNames,
766 domcomment_Invoke,
767 domcomment_get_nodeName,
768 domcomment_get_nodeValue,
769 domcomment_put_nodeValue,
770 domcomment_get_nodeType,
771 domcomment_get_parentNode,
772 domcomment_get_childNodes,
773 domcomment_get_firstChild,
774 domcomment_get_lastChild,
775 domcomment_get_previousSibling,
776 domcomment_get_nextSibling,
777 domcomment_get_attributes,
778 domcomment_insertBefore,
779 domcomment_replaceChild,
780 domcomment_removeChild,
781 domcomment_appendChild,
782 domcomment_hasChildNodes,
783 domcomment_get_ownerDocument,
784 domcomment_cloneNode,
785 domcomment_get_nodeTypeString,
786 domcomment_get_text,
787 domcomment_put_text,
788 domcomment_get_specified,
789 domcomment_get_definition,
790 domcomment_get_nodeTypedValue,
791 domcomment_put_nodeTypedValue,
792 domcomment_get_dataType,
793 domcomment_put_dataType,
794 domcomment_get_xml,
795 domcomment_transformNode,
796 domcomment_selectNodes,
797 domcomment_selectSingleNode,
798 domcomment_get_parsed,
799 domcomment_get_namespaceURI,
800 domcomment_get_prefix,
801 domcomment_get_baseName,
802 domcomment_transformNodeToObject,
803 domcomment_get_data,
804 domcomment_put_data,
805 domcomment_get_length,
806 domcomment_substringData,
807 domcomment_appendData,
808 domcomment_insertData,
809 domcomment_deleteData,
810 domcomment_replaceData
813 static const tid_t domcomment_iface_tids[] = {
814 IXMLDOMComment_tid,
818 static dispex_static_data_t domcomment_dispex = {
819 NULL,
820 IXMLDOMComment_tid,
821 NULL,
822 domcomment_iface_tids
825 IUnknown* create_comment( xmlNodePtr comment )
827 domcomment *This;
829 This = heap_alloc( sizeof *This );
830 if ( !This )
831 return NULL;
833 This->IXMLDOMComment_iface.lpVtbl = &domcomment_vtbl;
834 This->ref = 1;
836 init_xmlnode(&This->node, comment, (IXMLDOMNode*)&This->IXMLDOMComment_iface, &domcomment_dispex);
838 return (IUnknown*)&This->IXMLDOMComment_iface;