2 * DOM CDATA node implementation
4 * Copyright 2007 Alistair Leslie-Hughes
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
32 #include "msxml_private.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
40 typedef struct _domcdata
43 const struct IXMLDOMCDATASectionVtbl *lpVtbl;
47 static inline domcdata *impl_from_IXMLDOMCDATASection( IXMLDOMCDATASection *iface )
49 return (domcdata *)((char*)iface - FIELD_OFFSET(domcdata, lpVtbl));
52 static HRESULT WINAPI domcdata_QueryInterface(
53 IXMLDOMCDATASection *iface,
57 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
58 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
60 if ( IsEqualGUID( riid, &IID_IXMLDOMCDATASection ) ||
61 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
62 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
63 IsEqualGUID( riid, &IID_IDispatch ) ||
64 IsEqualGUID( riid, &IID_IUnknown ) )
68 else if ( IsEqualGUID( riid, &IID_IXMLDOMText ) ||
69 IsEqualGUID( riid, &IID_IXMLDOMElement ) )
71 TRACE("Unsupported interface\n");
74 else if(node_query_interface(&This->node, riid, ppvObject))
76 return *ppvObject ? S_OK : E_NOINTERFACE;
80 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
84 IXMLDOMText_AddRef((IUnknown*)*ppvObject);
88 static ULONG WINAPI domcdata_AddRef(
89 IXMLDOMCDATASection *iface )
91 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
92 return InterlockedIncrement( &This->ref );
95 static ULONG WINAPI domcdata_Release(
96 IXMLDOMCDATASection *iface )
98 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
101 ref = InterlockedDecrement( &This->ref );
104 destroy_xmlnode(&This->node);
111 static HRESULT WINAPI domcdata_GetTypeInfoCount(
112 IXMLDOMCDATASection *iface,
115 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
117 TRACE("(%p)->(%p)\n", This, pctinfo);
124 static HRESULT WINAPI domcdata_GetTypeInfo(
125 IXMLDOMCDATASection *iface,
126 UINT iTInfo, LCID lcid,
127 ITypeInfo** ppTInfo )
129 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
132 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
134 hr = get_typeinfo(IXMLDOMCDATASection_tid, ppTInfo);
139 static HRESULT WINAPI domcdata_GetIDsOfNames(
140 IXMLDOMCDATASection *iface,
141 REFIID riid, LPOLESTR* rgszNames,
142 UINT cNames, LCID lcid, DISPID* rgDispId )
144 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
148 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
151 if(!rgszNames || cNames == 0 || !rgDispId)
154 hr = get_typeinfo(IXMLDOMCDATASection_tid, &typeinfo);
157 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
158 ITypeInfo_Release(typeinfo);
164 static HRESULT WINAPI domcdata_Invoke(
165 IXMLDOMCDATASection *iface,
166 DISPID dispIdMember, REFIID riid, LCID lcid,
167 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
168 EXCEPINFO* pExcepInfo, UINT* puArgErr )
170 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
174 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
175 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
177 hr = get_typeinfo(IXMLDOMCDATASection_tid, &typeinfo);
180 hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
181 pVarResult, pExcepInfo, puArgErr);
182 ITypeInfo_Release(typeinfo);
188 static HRESULT WINAPI domcdata_get_nodeName(
189 IXMLDOMCDATASection *iface,
192 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
194 static const WCHAR cdata_sectionW[] =
195 {'#','c','d','a','t','a','-','s','e','c','t','i','o','n',0};
197 TRACE("(%p)->(%p)\n", This, p);
199 return return_bstr(cdata_sectionW, p);
202 static HRESULT WINAPI domcdata_get_nodeValue(
203 IXMLDOMCDATASection *iface,
206 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
208 TRACE("(%p)->(%p)\n", This, value);
210 return node_get_content(&This->node, value);
213 static HRESULT WINAPI domcdata_put_nodeValue(
214 IXMLDOMCDATASection *iface,
217 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
219 TRACE("(%p)->(v%d)\n", This, V_VT(&value));
221 return node_put_value(&This->node, &value);
224 static HRESULT WINAPI domcdata_get_nodeType(
225 IXMLDOMCDATASection *iface,
226 DOMNodeType* domNodeType )
228 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
230 TRACE("(%p)->(%p)\n", This, domNodeType);
232 *domNodeType = NODE_CDATA_SECTION;
236 static HRESULT WINAPI domcdata_get_parentNode(
237 IXMLDOMCDATASection *iface,
238 IXMLDOMNode** parent )
240 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
242 TRACE("(%p)->(%p)\n", This, parent);
244 return node_get_parent(&This->node, parent);
247 static HRESULT WINAPI domcdata_get_childNodes(
248 IXMLDOMCDATASection *iface,
249 IXMLDOMNodeList** outList)
251 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
253 TRACE("(%p)->(%p)\n", This, outList);
255 return node_get_child_nodes(&This->node, outList);
258 static HRESULT WINAPI domcdata_get_firstChild(
259 IXMLDOMCDATASection *iface,
260 IXMLDOMNode** domNode)
262 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
264 TRACE("(%p)->(%p)\n", This, domNode);
266 return return_null_node(domNode);
269 static HRESULT WINAPI domcdata_get_lastChild(
270 IXMLDOMCDATASection *iface,
271 IXMLDOMNode** domNode)
273 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
275 TRACE("(%p)->(%p)\n", This, domNode);
277 return return_null_node(domNode);
280 static HRESULT WINAPI domcdata_get_previousSibling(
281 IXMLDOMCDATASection *iface,
282 IXMLDOMNode** domNode)
284 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
286 TRACE("(%p)->(%p)\n", This, domNode);
288 return node_get_previous_sibling(&This->node, domNode);
291 static HRESULT WINAPI domcdata_get_nextSibling(
292 IXMLDOMCDATASection *iface,
293 IXMLDOMNode** domNode)
295 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
297 TRACE("(%p)->(%p)\n", This, domNode);
299 return node_get_next_sibling(&This->node, domNode);
302 static HRESULT WINAPI domcdata_get_attributes(
303 IXMLDOMCDATASection *iface,
304 IXMLDOMNamedNodeMap** attributeMap)
306 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
308 TRACE("(%p)->(%p)\n", This, attributeMap);
310 return return_null_ptr((void**)attributeMap);
313 static HRESULT WINAPI domcdata_insertBefore(
314 IXMLDOMCDATASection *iface,
315 IXMLDOMNode* newNode, VARIANT refChild,
316 IXMLDOMNode** outOldNode)
318 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
320 FIXME("(%p)->(%p x%d %p) needs test\n", This, newNode, V_VT(&refChild), outOldNode);
322 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
325 static HRESULT WINAPI domcdata_replaceChild(
326 IXMLDOMCDATASection *iface,
327 IXMLDOMNode* newNode,
328 IXMLDOMNode* oldNode,
329 IXMLDOMNode** outOldNode)
331 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
332 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
335 static HRESULT WINAPI domcdata_removeChild(
336 IXMLDOMCDATASection *iface,
337 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
339 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
340 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
343 static HRESULT WINAPI domcdata_appendChild(
344 IXMLDOMCDATASection *iface,
345 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
347 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
348 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
351 static HRESULT WINAPI domcdata_hasChildNodes(
352 IXMLDOMCDATASection *iface,
355 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
356 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
359 static HRESULT WINAPI domcdata_get_ownerDocument(
360 IXMLDOMCDATASection *iface,
361 IXMLDOMDocument** domDocument)
363 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
364 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
367 static HRESULT WINAPI domcdata_cloneNode(
368 IXMLDOMCDATASection *iface,
369 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
371 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
372 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
375 static HRESULT WINAPI domcdata_get_nodeTypeString(
376 IXMLDOMCDATASection *iface,
379 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
380 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
383 static HRESULT WINAPI domcdata_get_text(
384 IXMLDOMCDATASection *iface,
387 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
388 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
391 static HRESULT WINAPI domcdata_put_text(
392 IXMLDOMCDATASection *iface,
395 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
396 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
399 static HRESULT WINAPI domcdata_get_specified(
400 IXMLDOMCDATASection *iface,
403 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
404 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
407 static HRESULT WINAPI domcdata_get_definition(
408 IXMLDOMCDATASection *iface,
409 IXMLDOMNode** domNode)
411 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
412 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
415 static HRESULT WINAPI domcdata_get_nodeTypedValue(
416 IXMLDOMCDATASection *iface,
419 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
420 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
423 static HRESULT WINAPI domcdata_put_nodeTypedValue(
424 IXMLDOMCDATASection *iface,
427 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
428 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
431 static HRESULT WINAPI domcdata_get_dataType(
432 IXMLDOMCDATASection *iface,
435 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
436 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
439 static HRESULT WINAPI domcdata_put_dataType(
440 IXMLDOMCDATASection *iface,
443 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
444 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
447 static HRESULT WINAPI domcdata_get_xml(
448 IXMLDOMCDATASection *iface,
451 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
452 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
455 static HRESULT WINAPI domcdata_transformNode(
456 IXMLDOMCDATASection *iface,
457 IXMLDOMNode* domNode, BSTR* p)
459 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
460 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
463 static HRESULT WINAPI domcdata_selectNodes(
464 IXMLDOMCDATASection *iface,
465 BSTR p, IXMLDOMNodeList** outList)
467 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
468 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
471 static HRESULT WINAPI domcdata_selectSingleNode(
472 IXMLDOMCDATASection *iface,
473 BSTR p, IXMLDOMNode** outNode)
475 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
476 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
479 static HRESULT WINAPI domcdata_get_parsed(
480 IXMLDOMCDATASection *iface,
483 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
484 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
487 static HRESULT WINAPI domcdata_get_namespaceURI(
488 IXMLDOMCDATASection *iface,
491 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
492 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
495 static HRESULT WINAPI domcdata_get_prefix(
496 IXMLDOMCDATASection *iface,
499 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
500 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
503 static HRESULT WINAPI domcdata_get_baseName(
504 IXMLDOMCDATASection *iface,
507 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
508 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
511 static HRESULT WINAPI domcdata_transformNodeToObject(
512 IXMLDOMCDATASection *iface,
513 IXMLDOMNode* domNode, VARIANT var1)
515 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
516 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
519 static HRESULT WINAPI domcdata_get_data(
520 IXMLDOMCDATASection *iface,
529 hr = IXMLDOMCDATASection_get_nodeValue( iface, &vRet );
538 static HRESULT WINAPI domcdata_put_data(
539 IXMLDOMCDATASection *iface,
542 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
545 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
547 V_VT(&val) = VT_BSTR;
550 return IXMLDOMCDATASection_put_nodeValue( iface, val );
553 static HRESULT WINAPI domcdata_get_length(
554 IXMLDOMCDATASection *iface,
557 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
561 TRACE("(%p)->(%p)\n", This, len);
566 hr = IXMLDOMCDATASection_get_data(iface, &data);
569 *len = SysStringLen(data);
576 static HRESULT WINAPI domcdata_substringData(
577 IXMLDOMCDATASection *iface,
578 LONG offset, LONG count, BSTR *p)
580 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
584 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
590 if(offset < 0 || count < 0)
596 hr = IXMLDOMCDATASection_get_data(iface, &data);
599 LONG len = SysStringLen(data);
603 if(offset + count > len)
604 *p = SysAllocString(&data[offset]);
606 *p = SysAllocStringLen(&data[offset], count);
617 static HRESULT WINAPI domcdata_appendData(
618 IXMLDOMCDATASection *iface,
621 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
626 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
628 /* Nothing to do if NULL or an Empty string passed in. */
629 if((p_len = SysStringLen(p)) == 0) return S_OK;
631 hr = IXMLDOMCDATASection_get_data(iface, &data);
634 LONG len = SysStringLen(data);
635 BSTR str = SysAllocStringLen(NULL, p_len + len);
637 memcpy(str, data, len*sizeof(WCHAR));
638 memcpy(&str[len], p, p_len*sizeof(WCHAR));
641 hr = IXMLDOMCDATASection_put_data(iface, str);
650 static HRESULT WINAPI domcdata_insertData(
651 IXMLDOMCDATASection *iface,
654 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
659 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
661 /* If have a NULL or empty string, don't do anything. */
662 if((p_len = SysStringLen(p)) == 0)
670 hr = IXMLDOMCDATASection_get_data(iface, &data);
673 LONG len = SysStringLen(data);
682 str = SysAllocStringLen(NULL, len + p_len);
683 /* start part, supplied string and end part */
684 memcpy(str, data, offset*sizeof(WCHAR));
685 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
686 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
689 hr = IXMLDOMCDATASection_put_data(iface, str);
698 static HRESULT WINAPI domcdata_deleteData(
699 IXMLDOMCDATASection *iface,
700 LONG offset, LONG count)
702 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
707 TRACE("(%p)->(%d %d)\n", This, offset, count);
709 hr = IXMLDOMCDATASection_get_length(iface, &len);
710 if(hr != S_OK) return hr;
712 if((offset < 0) || (offset > len) || (count < 0))
715 if(len == 0) return S_OK;
717 /* cutting start or end */
718 if((offset == 0) || ((count + offset) >= len))
721 IXMLDOMCDATASection_substringData(iface, count, len - count, &str);
723 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
724 hr = IXMLDOMCDATASection_put_data(iface, str);
727 /* cutting from the inside */
731 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
732 IXMLDOMCDATASection_substringData(iface, offset + count, len - count, &str_end);
734 hr = IXMLDOMCDATASection_put_data(iface, str);
736 hr = IXMLDOMCDATASection_appendData(iface, str_end);
738 SysFreeString(str_end);
746 static HRESULT WINAPI domcdata_replaceData(
747 IXMLDOMCDATASection *iface,
748 LONG offset, LONG count, BSTR p)
750 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
753 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
755 hr = IXMLDOMCDATASection_deleteData(iface, offset, count);
758 hr = IXMLDOMCDATASection_insertData(iface, offset, p);
763 static HRESULT WINAPI domcdata_splitText(
764 IXMLDOMCDATASection *iface,
765 LONG offset, IXMLDOMText **txtNode)
767 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
768 IXMLDOMDocument *doc;
772 TRACE("(%p)->(%d %p)\n", This, offset, txtNode);
774 if (!txtNode || offset < 0) return E_INVALIDARG;
778 IXMLDOMCDATASection_get_length(iface, &length);
780 if (offset > length) return E_INVALIDARG;
781 if (offset == length) return S_FALSE;
783 hr = IXMLDOMCDATASection_get_ownerDocument(iface, &doc);
788 hr = IXMLDOMCDATASection_substringData(iface, offset, length - offset, &data);
791 hr = IXMLDOMDocument_createTextNode(doc, data, txtNode);
796 hr = IXMLDOMCDATASection_get_parentNode(iface, &parent);
799 IXMLDOMCDATASection_deleteData(iface, 0, offset);
800 hr = IXMLDOMNode_appendChild(parent, (IXMLDOMNode*)*txtNode, NULL);
805 IXMLDOMDocument_Release(doc);
811 static const struct IXMLDOMCDATASectionVtbl domcdata_vtbl =
813 domcdata_QueryInterface,
816 domcdata_GetTypeInfoCount,
817 domcdata_GetTypeInfo,
818 domcdata_GetIDsOfNames,
820 domcdata_get_nodeName,
821 domcdata_get_nodeValue,
822 domcdata_put_nodeValue,
823 domcdata_get_nodeType,
824 domcdata_get_parentNode,
825 domcdata_get_childNodes,
826 domcdata_get_firstChild,
827 domcdata_get_lastChild,
828 domcdata_get_previousSibling,
829 domcdata_get_nextSibling,
830 domcdata_get_attributes,
831 domcdata_insertBefore,
832 domcdata_replaceChild,
833 domcdata_removeChild,
834 domcdata_appendChild,
835 domcdata_hasChildNodes,
836 domcdata_get_ownerDocument,
838 domcdata_get_nodeTypeString,
841 domcdata_get_specified,
842 domcdata_get_definition,
843 domcdata_get_nodeTypedValue,
844 domcdata_put_nodeTypedValue,
845 domcdata_get_dataType,
846 domcdata_put_dataType,
848 domcdata_transformNode,
849 domcdata_selectNodes,
850 domcdata_selectSingleNode,
852 domcdata_get_namespaceURI,
854 domcdata_get_baseName,
855 domcdata_transformNodeToObject,
859 domcdata_substringData,
863 domcdata_replaceData,
867 IUnknown* create_cdata( xmlNodePtr text )
871 This = heap_alloc( sizeof *This );
875 This->lpVtbl = &domcdata_vtbl;
878 init_xmlnode(&This->node, text, (IXMLDOMNode*)&This->lpVtbl, NULL);
880 return (IUnknown*) &This->lpVtbl;