wined3d: Use the FBO cache in stretch_rect_fbo().
[wine/hramrach.git] / dlls / msxml3 / comment.c
blobe74de07e87665c1002b24e31f74767956dc86996
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 "config.h"
25 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "msxml2.h"
32 #include "msxml_private.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
38 #ifdef HAVE_LIBXML2
40 typedef struct _domcomment
42 xmlnode node;
43 const struct IXMLDOMCommentVtbl *lpVtbl;
44 LONG ref;
45 } domcomment;
47 static inline domcomment *impl_from_IXMLDOMComment( IXMLDOMComment *iface )
49 return (domcomment *)((char*)iface - FIELD_OFFSET(domcomment, lpVtbl));
52 static HRESULT WINAPI domcomment_QueryInterface(
53 IXMLDOMComment *iface,
54 REFIID riid,
55 void** ppvObject )
57 domcomment *This = impl_from_IXMLDOMComment( iface );
58 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
60 if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
61 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
62 IsEqualGUID( riid, &IID_IDispatch ) ||
63 IsEqualGUID( riid, &IID_IUnknown ) )
65 *ppvObject = iface;
67 else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
69 *ppvObject = IXMLDOMNode_from_impl(&This->node);
71 else
73 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
74 return E_NOINTERFACE;
77 IXMLDOMText_AddRef((IUnknown*)*ppvObject);
78 return S_OK;
81 static ULONG WINAPI domcomment_AddRef(
82 IXMLDOMComment *iface )
84 domcomment *This = impl_from_IXMLDOMComment( iface );
85 return InterlockedIncrement( &This->ref );
88 static ULONG WINAPI domcomment_Release(
89 IXMLDOMComment *iface )
91 domcomment *This = impl_from_IXMLDOMComment( iface );
92 ULONG ref;
94 ref = InterlockedDecrement( &This->ref );
95 if ( ref == 0 )
97 destroy_xmlnode(&This->node);
98 heap_free( This );
101 return ref;
104 static HRESULT WINAPI domcomment_GetTypeInfoCount(
105 IXMLDOMComment *iface,
106 UINT* pctinfo )
108 domcomment *This = impl_from_IXMLDOMComment( iface );
110 TRACE("(%p)->(%p)\n", This, pctinfo);
112 *pctinfo = 1;
114 return S_OK;
117 static HRESULT WINAPI domcomment_GetTypeInfo(
118 IXMLDOMComment *iface,
119 UINT iTInfo, LCID lcid,
120 ITypeInfo** ppTInfo )
122 domcomment *This = impl_from_IXMLDOMComment( iface );
123 HRESULT hr;
125 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
127 hr = get_typeinfo(IXMLDOMComment_tid, ppTInfo);
129 return hr;
132 static HRESULT WINAPI domcomment_GetIDsOfNames(
133 IXMLDOMComment *iface,
134 REFIID riid, LPOLESTR* rgszNames,
135 UINT cNames, LCID lcid, DISPID* rgDispId )
137 domcomment *This = impl_from_IXMLDOMComment( iface );
138 ITypeInfo *typeinfo;
139 HRESULT hr;
141 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
142 lcid, rgDispId);
144 if(!rgszNames || cNames == 0 || !rgDispId)
145 return E_INVALIDARG;
147 hr = get_typeinfo(IXMLDOMComment_tid, &typeinfo);
148 if(SUCCEEDED(hr))
150 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
151 ITypeInfo_Release(typeinfo);
154 return hr;
157 static HRESULT WINAPI domcomment_Invoke(
158 IXMLDOMComment *iface,
159 DISPID dispIdMember, REFIID riid, LCID lcid,
160 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
161 EXCEPINFO* pExcepInfo, UINT* puArgErr )
163 domcomment *This = impl_from_IXMLDOMComment( iface );
164 ITypeInfo *typeinfo;
165 HRESULT hr;
167 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
168 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
170 hr = get_typeinfo(IXMLDOMComment_tid, &typeinfo);
171 if(SUCCEEDED(hr))
173 hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
174 pVarResult, pExcepInfo, puArgErr);
175 ITypeInfo_Release(typeinfo);
178 return hr;
181 static HRESULT WINAPI domcomment_get_nodeName(
182 IXMLDOMComment *iface,
183 BSTR* p )
185 domcomment *This = impl_from_IXMLDOMComment( iface );
186 return IXMLDOMNode_get_nodeName( IXMLDOMNode_from_impl(&This->node), p );
189 static HRESULT WINAPI domcomment_get_nodeValue(
190 IXMLDOMComment *iface,
191 VARIANT* var1 )
193 domcomment *This = impl_from_IXMLDOMComment( iface );
194 return IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), var1 );
197 static HRESULT WINAPI domcomment_put_nodeValue(
198 IXMLDOMComment *iface,
199 VARIANT var1 )
201 domcomment *This = impl_from_IXMLDOMComment( iface );
202 return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), var1 );
205 static HRESULT WINAPI domcomment_get_nodeType(
206 IXMLDOMComment *iface,
207 DOMNodeType* domNodeType )
209 domcomment *This = impl_from_IXMLDOMComment( iface );
210 return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
213 static HRESULT WINAPI domcomment_get_parentNode(
214 IXMLDOMComment *iface,
215 IXMLDOMNode** parent )
217 domcomment *This = impl_from_IXMLDOMComment( iface );
218 return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
221 static HRESULT WINAPI domcomment_get_childNodes(
222 IXMLDOMComment *iface,
223 IXMLDOMNodeList** outList)
225 domcomment *This = impl_from_IXMLDOMComment( iface );
226 return IXMLDOMNode_get_childNodes( IXMLDOMNode_from_impl(&This->node), outList );
229 static HRESULT WINAPI domcomment_get_firstChild(
230 IXMLDOMComment *iface,
231 IXMLDOMNode** domNode)
233 domcomment *This = impl_from_IXMLDOMComment( iface );
234 return IXMLDOMNode_get_firstChild( IXMLDOMNode_from_impl(&This->node), domNode );
237 static HRESULT WINAPI domcomment_get_lastChild(
238 IXMLDOMComment *iface,
239 IXMLDOMNode** domNode)
241 domcomment *This = impl_from_IXMLDOMComment( iface );
242 return IXMLDOMNode_get_lastChild( IXMLDOMNode_from_impl(&This->node), domNode );
245 static HRESULT WINAPI domcomment_get_previousSibling(
246 IXMLDOMComment *iface,
247 IXMLDOMNode** domNode)
249 domcomment *This = impl_from_IXMLDOMComment( iface );
250 return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
253 static HRESULT WINAPI domcomment_get_nextSibling(
254 IXMLDOMComment *iface,
255 IXMLDOMNode** domNode)
257 domcomment *This = impl_from_IXMLDOMComment( iface );
258 return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
261 static HRESULT WINAPI domcomment_get_attributes(
262 IXMLDOMComment *iface,
263 IXMLDOMNamedNodeMap** attributeMap)
265 domcomment *This = impl_from_IXMLDOMComment( iface );
266 return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
269 static HRESULT WINAPI domcomment_insertBefore(
270 IXMLDOMComment *iface,
271 IXMLDOMNode* newNode, VARIANT var1,
272 IXMLDOMNode** outOldNode)
274 domcomment *This = impl_from_IXMLDOMComment( iface );
275 return IXMLDOMNode_insertBefore( IXMLDOMNode_from_impl(&This->node), newNode, var1, outOldNode );
278 static HRESULT WINAPI domcomment_replaceChild(
279 IXMLDOMComment *iface,
280 IXMLDOMNode* newNode,
281 IXMLDOMNode* oldNode,
282 IXMLDOMNode** outOldNode)
284 domcomment *This = impl_from_IXMLDOMComment( iface );
285 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
288 static HRESULT WINAPI domcomment_removeChild(
289 IXMLDOMComment *iface,
290 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
292 domcomment *This = impl_from_IXMLDOMComment( iface );
293 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
296 static HRESULT WINAPI domcomment_appendChild(
297 IXMLDOMComment *iface,
298 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
300 domcomment *This = impl_from_IXMLDOMComment( iface );
301 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
304 static HRESULT WINAPI domcomment_hasChildNodes(
305 IXMLDOMComment *iface,
306 VARIANT_BOOL* pbool)
308 domcomment *This = impl_from_IXMLDOMComment( iface );
309 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
312 static HRESULT WINAPI domcomment_get_ownerDocument(
313 IXMLDOMComment *iface,
314 IXMLDOMDocument** domDocument)
316 domcomment *This = impl_from_IXMLDOMComment( iface );
317 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
320 static HRESULT WINAPI domcomment_cloneNode(
321 IXMLDOMComment *iface,
322 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
324 domcomment *This = impl_from_IXMLDOMComment( iface );
325 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
328 static HRESULT WINAPI domcomment_get_nodeTypeString(
329 IXMLDOMComment *iface,
330 BSTR* p)
332 domcomment *This = impl_from_IXMLDOMComment( iface );
333 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
336 static HRESULT WINAPI domcomment_get_text(
337 IXMLDOMComment *iface,
338 BSTR* p)
340 domcomment *This = impl_from_IXMLDOMComment( iface );
341 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
344 static HRESULT WINAPI domcomment_put_text(
345 IXMLDOMComment *iface,
346 BSTR p)
348 domcomment *This = impl_from_IXMLDOMComment( iface );
349 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
352 static HRESULT WINAPI domcomment_get_specified(
353 IXMLDOMComment *iface,
354 VARIANT_BOOL* pbool)
356 domcomment *This = impl_from_IXMLDOMComment( iface );
357 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
360 static HRESULT WINAPI domcomment_get_definition(
361 IXMLDOMComment *iface,
362 IXMLDOMNode** domNode)
364 domcomment *This = impl_from_IXMLDOMComment( iface );
365 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
368 static HRESULT WINAPI domcomment_get_nodeTypedValue(
369 IXMLDOMComment *iface,
370 VARIANT* var1)
372 domcomment *This = impl_from_IXMLDOMComment( iface );
373 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
376 static HRESULT WINAPI domcomment_put_nodeTypedValue(
377 IXMLDOMComment *iface,
378 VARIANT var1)
380 domcomment *This = impl_from_IXMLDOMComment( iface );
381 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
384 static HRESULT WINAPI domcomment_get_dataType(
385 IXMLDOMComment *iface,
386 VARIANT* var1)
388 domcomment *This = impl_from_IXMLDOMComment( iface );
389 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
392 static HRESULT WINAPI domcomment_put_dataType(
393 IXMLDOMComment *iface,
394 BSTR p)
396 domcomment *This = impl_from_IXMLDOMComment( iface );
397 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
400 static HRESULT WINAPI domcomment_get_xml(
401 IXMLDOMComment *iface,
402 BSTR* p)
404 domcomment *This = impl_from_IXMLDOMComment( iface );
405 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
408 static HRESULT WINAPI domcomment_transformNode(
409 IXMLDOMComment *iface,
410 IXMLDOMNode* domNode, BSTR* p)
412 domcomment *This = impl_from_IXMLDOMComment( iface );
413 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
416 static HRESULT WINAPI domcomment_selectNodes(
417 IXMLDOMComment *iface,
418 BSTR p, IXMLDOMNodeList** outList)
420 domcomment *This = impl_from_IXMLDOMComment( iface );
421 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
424 static HRESULT WINAPI domcomment_selectSingleNode(
425 IXMLDOMComment *iface,
426 BSTR p, IXMLDOMNode** outNode)
428 domcomment *This = impl_from_IXMLDOMComment( iface );
429 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
432 static HRESULT WINAPI domcomment_get_parsed(
433 IXMLDOMComment *iface,
434 VARIANT_BOOL* pbool)
436 domcomment *This = impl_from_IXMLDOMComment( iface );
437 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
440 static HRESULT WINAPI domcomment_get_namespaceURI(
441 IXMLDOMComment *iface,
442 BSTR* p)
444 domcomment *This = impl_from_IXMLDOMComment( iface );
445 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
448 static HRESULT WINAPI domcomment_get_prefix(
449 IXMLDOMComment *iface,
450 BSTR* p)
452 domcomment *This = impl_from_IXMLDOMComment( iface );
453 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
456 static HRESULT WINAPI domcomment_get_baseName(
457 IXMLDOMComment *iface,
458 BSTR* p)
460 domcomment *This = impl_from_IXMLDOMComment( iface );
461 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
464 static HRESULT WINAPI domcomment_transformNodeToObject(
465 IXMLDOMComment *iface,
466 IXMLDOMNode* domNode, VARIANT var1)
468 domcomment *This = impl_from_IXMLDOMComment( iface );
469 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
472 static HRESULT WINAPI domcomment_get_data(
473 IXMLDOMComment *iface,
474 BSTR *p)
476 domcomment *This = impl_from_IXMLDOMComment( iface );
477 HRESULT hr;
478 VARIANT vRet;
480 TRACE("(%p)->(%p)\n", This, p);
482 if(!p)
483 return E_INVALIDARG;
485 hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet );
486 if(hr == S_OK)
488 *p = V_BSTR(&vRet);
491 return hr;
494 static HRESULT WINAPI domcomment_put_data(
495 IXMLDOMComment *iface,
496 BSTR data)
498 domcomment *This = impl_from_IXMLDOMComment( iface );
499 VARIANT val;
501 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
503 V_VT(&val) = VT_BSTR;
504 V_BSTR(&val) = data;
506 return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), val );
509 static HRESULT WINAPI domcomment_get_length(
510 IXMLDOMComment *iface,
511 LONG *len)
513 domcomment *This = impl_from_IXMLDOMComment( iface );
514 HRESULT hr;
515 BSTR data;
517 TRACE("(%p)->(%p)\n", This, len);
519 if(!len)
520 return E_INVALIDARG;
522 hr = IXMLDOMComment_get_data(iface, &data);
523 if(hr == S_OK)
525 *len = SysStringLen(data);
526 SysFreeString(data);
529 return hr;
532 static HRESULT WINAPI domcomment_substringData(
533 IXMLDOMComment *iface,
534 LONG offset, LONG count, BSTR *p)
536 domcomment *This = impl_from_IXMLDOMComment( iface );
537 HRESULT hr;
538 BSTR data;
540 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
542 if(!p)
543 return E_INVALIDARG;
545 *p = NULL;
546 if(offset < 0 || count < 0)
547 return E_INVALIDARG;
549 if(count == 0)
550 return S_FALSE;
552 hr = IXMLDOMComment_get_data(iface, &data);
553 if(hr == S_OK)
555 LONG len = SysStringLen(data);
557 if(offset < len)
559 if(offset + count > len)
560 *p = SysAllocString(&data[offset]);
561 else
562 *p = SysAllocStringLen(&data[offset], count);
564 else
565 hr = S_FALSE;
567 SysFreeString(data);
570 return hr;
573 static HRESULT WINAPI domcomment_appendData(
574 IXMLDOMComment *iface,
575 BSTR p)
577 domcomment *This = impl_from_IXMLDOMComment( iface );
578 HRESULT hr;
579 BSTR data;
580 LONG p_len;
582 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
584 /* Nothing to do if NULL or an Empty string passed in. */
585 if((p_len = SysStringLen(p)) == 0) return S_OK;
587 hr = IXMLDOMComment_get_data(iface, &data);
588 if(hr == S_OK)
590 LONG len = SysStringLen(data);
591 BSTR str = SysAllocStringLen(NULL, p_len + len);
593 memcpy(str, data, len*sizeof(WCHAR));
594 memcpy(&str[len], p, p_len*sizeof(WCHAR));
595 str[len+p_len] = 0;
597 hr = IXMLDOMComment_put_data(iface, str);
599 SysFreeString(str);
600 SysFreeString(data);
603 return hr;
606 static HRESULT WINAPI domcomment_insertData(
607 IXMLDOMComment *iface,
608 LONG offset, BSTR p)
610 domcomment *This = impl_from_IXMLDOMComment( iface );
611 HRESULT hr;
612 BSTR data;
613 LONG p_len;
615 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
617 /* If have a NULL or empty string, don't do anything. */
618 if((p_len = SysStringLen(p)) == 0)
619 return S_OK;
621 if(offset < 0)
623 return E_INVALIDARG;
626 hr = IXMLDOMComment_get_data(iface, &data);
627 if(hr == S_OK)
629 LONG len = SysStringLen(data);
630 BSTR str;
632 if(len < offset)
634 SysFreeString(data);
635 return E_INVALIDARG;
638 str = SysAllocStringLen(NULL, len + p_len);
639 /* start part, supplied string and end part */
640 memcpy(str, data, offset*sizeof(WCHAR));
641 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
642 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
643 str[len+p_len] = 0;
645 hr = IXMLDOMComment_put_data(iface, str);
647 SysFreeString(str);
648 SysFreeString(data);
651 return hr;
654 static HRESULT WINAPI domcomment_deleteData(
655 IXMLDOMComment *iface,
656 LONG offset, LONG count)
658 HRESULT hr;
659 LONG len = -1;
660 BSTR str;
662 TRACE("(%p)->(%d %d)\n", iface, offset, count);
664 hr = IXMLDOMComment_get_length(iface, &len);
665 if(hr != S_OK) return hr;
667 if((offset < 0) || (offset > len) || (count < 0))
668 return E_INVALIDARG;
670 if(len == 0) return S_OK;
672 /* cutting start or end */
673 if((offset == 0) || ((count + offset) >= len))
675 if(offset == 0)
676 IXMLDOMComment_substringData(iface, count, len - count, &str);
677 else
678 IXMLDOMComment_substringData(iface, 0, offset, &str);
679 hr = IXMLDOMComment_put_data(iface, str);
681 else
682 /* cutting from the inside */
684 BSTR str_end;
686 IXMLDOMComment_substringData(iface, 0, offset, &str);
687 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
689 hr = IXMLDOMComment_put_data(iface, str);
690 if(hr == S_OK)
691 hr = IXMLDOMComment_appendData(iface, str_end);
693 SysFreeString(str_end);
696 SysFreeString(str);
698 return hr;
701 static HRESULT WINAPI domcomment_replaceData(
702 IXMLDOMComment *iface,
703 LONG offset, LONG count, BSTR p)
705 domcomment *This = impl_from_IXMLDOMComment( iface );
706 HRESULT hr;
708 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
710 hr = IXMLDOMComment_deleteData(iface, offset, count);
712 if (hr == S_OK)
713 hr = IXMLDOMComment_insertData(iface, offset, p);
715 return hr;
718 static const struct IXMLDOMCommentVtbl domcomment_vtbl =
720 domcomment_QueryInterface,
721 domcomment_AddRef,
722 domcomment_Release,
723 domcomment_GetTypeInfoCount,
724 domcomment_GetTypeInfo,
725 domcomment_GetIDsOfNames,
726 domcomment_Invoke,
727 domcomment_get_nodeName,
728 domcomment_get_nodeValue,
729 domcomment_put_nodeValue,
730 domcomment_get_nodeType,
731 domcomment_get_parentNode,
732 domcomment_get_childNodes,
733 domcomment_get_firstChild,
734 domcomment_get_lastChild,
735 domcomment_get_previousSibling,
736 domcomment_get_nextSibling,
737 domcomment_get_attributes,
738 domcomment_insertBefore,
739 domcomment_replaceChild,
740 domcomment_removeChild,
741 domcomment_appendChild,
742 domcomment_hasChildNodes,
743 domcomment_get_ownerDocument,
744 domcomment_cloneNode,
745 domcomment_get_nodeTypeString,
746 domcomment_get_text,
747 domcomment_put_text,
748 domcomment_get_specified,
749 domcomment_get_definition,
750 domcomment_get_nodeTypedValue,
751 domcomment_put_nodeTypedValue,
752 domcomment_get_dataType,
753 domcomment_put_dataType,
754 domcomment_get_xml,
755 domcomment_transformNode,
756 domcomment_selectNodes,
757 domcomment_selectSingleNode,
758 domcomment_get_parsed,
759 domcomment_get_namespaceURI,
760 domcomment_get_prefix,
761 domcomment_get_baseName,
762 domcomment_transformNodeToObject,
763 domcomment_get_data,
764 domcomment_put_data,
765 domcomment_get_length,
766 domcomment_substringData,
767 domcomment_appendData,
768 domcomment_insertData,
769 domcomment_deleteData,
770 domcomment_replaceData
773 IUnknown* create_comment( xmlNodePtr comment )
775 domcomment *This;
777 This = heap_alloc( sizeof *This );
778 if ( !This )
779 return NULL;
781 This->lpVtbl = &domcomment_vtbl;
782 This->ref = 1;
784 init_xmlnode(&This->node, comment, (IUnknown*)&This->lpVtbl, NULL);
786 return (IUnknown*) &This->lpVtbl;
789 #endif