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 );
263 return IXMLDOMNode_get_firstChild( IXMLDOMNode_from_impl(&This->node), domNode );
266 static HRESULT WINAPI domcdata_get_lastChild(
267 IXMLDOMCDATASection *iface,
268 IXMLDOMNode** domNode)
270 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
271 return IXMLDOMNode_get_lastChild( IXMLDOMNode_from_impl(&This->node), domNode );
274 static HRESULT WINAPI domcdata_get_previousSibling(
275 IXMLDOMCDATASection *iface,
276 IXMLDOMNode** domNode)
278 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
279 return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
282 static HRESULT WINAPI domcdata_get_nextSibling(
283 IXMLDOMCDATASection *iface,
284 IXMLDOMNode** domNode)
286 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
287 return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
290 static HRESULT WINAPI domcdata_get_attributes(
291 IXMLDOMCDATASection *iface,
292 IXMLDOMNamedNodeMap** attributeMap)
294 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
295 return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
298 static HRESULT WINAPI domcdata_insertBefore(
299 IXMLDOMCDATASection *iface,
300 IXMLDOMNode* newNode, VARIANT var1,
301 IXMLDOMNode** outOldNode)
303 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
304 return IXMLDOMNode_insertBefore( IXMLDOMNode_from_impl(&This->node), newNode, var1, outOldNode );
307 static HRESULT WINAPI domcdata_replaceChild(
308 IXMLDOMCDATASection *iface,
309 IXMLDOMNode* newNode,
310 IXMLDOMNode* oldNode,
311 IXMLDOMNode** outOldNode)
313 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
314 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
317 static HRESULT WINAPI domcdata_removeChild(
318 IXMLDOMCDATASection *iface,
319 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
321 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
322 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
325 static HRESULT WINAPI domcdata_appendChild(
326 IXMLDOMCDATASection *iface,
327 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
329 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
330 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
333 static HRESULT WINAPI domcdata_hasChildNodes(
334 IXMLDOMCDATASection *iface,
337 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
338 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
341 static HRESULT WINAPI domcdata_get_ownerDocument(
342 IXMLDOMCDATASection *iface,
343 IXMLDOMDocument** domDocument)
345 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
346 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
349 static HRESULT WINAPI domcdata_cloneNode(
350 IXMLDOMCDATASection *iface,
351 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
353 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
354 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
357 static HRESULT WINAPI domcdata_get_nodeTypeString(
358 IXMLDOMCDATASection *iface,
361 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
362 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
365 static HRESULT WINAPI domcdata_get_text(
366 IXMLDOMCDATASection *iface,
369 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
370 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
373 static HRESULT WINAPI domcdata_put_text(
374 IXMLDOMCDATASection *iface,
377 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
378 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
381 static HRESULT WINAPI domcdata_get_specified(
382 IXMLDOMCDATASection *iface,
385 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
386 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
389 static HRESULT WINAPI domcdata_get_definition(
390 IXMLDOMCDATASection *iface,
391 IXMLDOMNode** domNode)
393 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
394 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
397 static HRESULT WINAPI domcdata_get_nodeTypedValue(
398 IXMLDOMCDATASection *iface,
401 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
402 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
405 static HRESULT WINAPI domcdata_put_nodeTypedValue(
406 IXMLDOMCDATASection *iface,
409 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
410 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
413 static HRESULT WINAPI domcdata_get_dataType(
414 IXMLDOMCDATASection *iface,
417 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
418 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
421 static HRESULT WINAPI domcdata_put_dataType(
422 IXMLDOMCDATASection *iface,
425 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
426 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
429 static HRESULT WINAPI domcdata_get_xml(
430 IXMLDOMCDATASection *iface,
433 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
434 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
437 static HRESULT WINAPI domcdata_transformNode(
438 IXMLDOMCDATASection *iface,
439 IXMLDOMNode* domNode, BSTR* p)
441 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
442 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
445 static HRESULT WINAPI domcdata_selectNodes(
446 IXMLDOMCDATASection *iface,
447 BSTR p, IXMLDOMNodeList** outList)
449 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
450 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
453 static HRESULT WINAPI domcdata_selectSingleNode(
454 IXMLDOMCDATASection *iface,
455 BSTR p, IXMLDOMNode** outNode)
457 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
458 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
461 static HRESULT WINAPI domcdata_get_parsed(
462 IXMLDOMCDATASection *iface,
465 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
466 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
469 static HRESULT WINAPI domcdata_get_namespaceURI(
470 IXMLDOMCDATASection *iface,
473 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
474 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
477 static HRESULT WINAPI domcdata_get_prefix(
478 IXMLDOMCDATASection *iface,
481 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
482 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
485 static HRESULT WINAPI domcdata_get_baseName(
486 IXMLDOMCDATASection *iface,
489 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
490 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
493 static HRESULT WINAPI domcdata_transformNodeToObject(
494 IXMLDOMCDATASection *iface,
495 IXMLDOMNode* domNode, VARIANT var1)
497 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
498 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
501 static HRESULT WINAPI domcdata_get_data(
502 IXMLDOMCDATASection *iface,
511 hr = IXMLDOMCDATASection_get_nodeValue( iface, &vRet );
520 static HRESULT WINAPI domcdata_put_data(
521 IXMLDOMCDATASection *iface,
524 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
527 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
529 V_VT(&val) = VT_BSTR;
532 return IXMLDOMCDATASection_put_nodeValue( iface, val );
535 static HRESULT WINAPI domcdata_get_length(
536 IXMLDOMCDATASection *iface,
539 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
543 TRACE("(%p)->(%p)\n", This, len);
548 hr = IXMLDOMCDATASection_get_data(iface, &data);
551 *len = SysStringLen(data);
558 static HRESULT WINAPI domcdata_substringData(
559 IXMLDOMCDATASection *iface,
560 LONG offset, LONG count, BSTR *p)
562 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
566 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
572 if(offset < 0 || count < 0)
578 hr = IXMLDOMCDATASection_get_data(iface, &data);
581 LONG len = SysStringLen(data);
585 if(offset + count > len)
586 *p = SysAllocString(&data[offset]);
588 *p = SysAllocStringLen(&data[offset], count);
599 static HRESULT WINAPI domcdata_appendData(
600 IXMLDOMCDATASection *iface,
603 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
608 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
610 /* Nothing to do if NULL or an Empty string passed in. */
611 if((p_len = SysStringLen(p)) == 0) return S_OK;
613 hr = IXMLDOMCDATASection_get_data(iface, &data);
616 LONG len = SysStringLen(data);
617 BSTR str = SysAllocStringLen(NULL, p_len + len);
619 memcpy(str, data, len*sizeof(WCHAR));
620 memcpy(&str[len], p, p_len*sizeof(WCHAR));
623 hr = IXMLDOMCDATASection_put_data(iface, str);
632 static HRESULT WINAPI domcdata_insertData(
633 IXMLDOMCDATASection *iface,
636 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
641 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
643 /* If have a NULL or empty string, don't do anything. */
644 if((p_len = SysStringLen(p)) == 0)
652 hr = IXMLDOMCDATASection_get_data(iface, &data);
655 LONG len = SysStringLen(data);
664 str = SysAllocStringLen(NULL, len + p_len);
665 /* start part, supplied string and end part */
666 memcpy(str, data, offset*sizeof(WCHAR));
667 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
668 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
671 hr = IXMLDOMCDATASection_put_data(iface, str);
680 static HRESULT WINAPI domcdata_deleteData(
681 IXMLDOMCDATASection *iface,
682 LONG offset, LONG count)
684 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
689 TRACE("(%p)->(%d %d)\n", This, offset, count);
691 hr = IXMLDOMCDATASection_get_length(iface, &len);
692 if(hr != S_OK) return hr;
694 if((offset < 0) || (offset > len) || (count < 0))
697 if(len == 0) return S_OK;
699 /* cutting start or end */
700 if((offset == 0) || ((count + offset) >= len))
703 IXMLDOMCDATASection_substringData(iface, count, len - count, &str);
705 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
706 hr = IXMLDOMCDATASection_put_data(iface, str);
709 /* cutting from the inside */
713 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
714 IXMLDOMCDATASection_substringData(iface, offset + count, len - count, &str_end);
716 hr = IXMLDOMCDATASection_put_data(iface, str);
718 hr = IXMLDOMCDATASection_appendData(iface, str_end);
720 SysFreeString(str_end);
728 static HRESULT WINAPI domcdata_replaceData(
729 IXMLDOMCDATASection *iface,
730 LONG offset, LONG count, BSTR p)
732 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
735 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
737 hr = IXMLDOMCDATASection_deleteData(iface, offset, count);
740 hr = IXMLDOMCDATASection_insertData(iface, offset, p);
745 static HRESULT WINAPI domcdata_splitText(
746 IXMLDOMCDATASection *iface,
747 LONG offset, IXMLDOMText **txtNode)
749 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
750 IXMLDOMDocument *doc;
754 TRACE("(%p)->(%d %p)\n", This, offset, txtNode);
756 if (!txtNode || offset < 0) return E_INVALIDARG;
760 IXMLDOMCDATASection_get_length(iface, &length);
762 if (offset > length) return E_INVALIDARG;
763 if (offset == length) return S_FALSE;
765 hr = IXMLDOMCDATASection_get_ownerDocument(iface, &doc);
770 hr = IXMLDOMCDATASection_substringData(iface, offset, length - offset, &data);
773 hr = IXMLDOMDocument_createTextNode(doc, data, txtNode);
778 hr = IXMLDOMCDATASection_get_parentNode(iface, &parent);
781 IXMLDOMCDATASection_deleteData(iface, 0, offset);
782 hr = IXMLDOMNode_appendChild(parent, (IXMLDOMNode*)*txtNode, NULL);
787 IXMLDOMDocument_Release(doc);
793 static const struct IXMLDOMCDATASectionVtbl domcdata_vtbl =
795 domcdata_QueryInterface,
798 domcdata_GetTypeInfoCount,
799 domcdata_GetTypeInfo,
800 domcdata_GetIDsOfNames,
802 domcdata_get_nodeName,
803 domcdata_get_nodeValue,
804 domcdata_put_nodeValue,
805 domcdata_get_nodeType,
806 domcdata_get_parentNode,
807 domcdata_get_childNodes,
808 domcdata_get_firstChild,
809 domcdata_get_lastChild,
810 domcdata_get_previousSibling,
811 domcdata_get_nextSibling,
812 domcdata_get_attributes,
813 domcdata_insertBefore,
814 domcdata_replaceChild,
815 domcdata_removeChild,
816 domcdata_appendChild,
817 domcdata_hasChildNodes,
818 domcdata_get_ownerDocument,
820 domcdata_get_nodeTypeString,
823 domcdata_get_specified,
824 domcdata_get_definition,
825 domcdata_get_nodeTypedValue,
826 domcdata_put_nodeTypedValue,
827 domcdata_get_dataType,
828 domcdata_put_dataType,
830 domcdata_transformNode,
831 domcdata_selectNodes,
832 domcdata_selectSingleNode,
834 domcdata_get_namespaceURI,
836 domcdata_get_baseName,
837 domcdata_transformNodeToObject,
841 domcdata_substringData,
845 domcdata_replaceData,
849 IUnknown* create_cdata( xmlNodePtr text )
853 This = heap_alloc( sizeof *This );
857 This->lpVtbl = &domcdata_vtbl;
860 init_xmlnode(&This->node, text, (IXMLDOMNode*)&This->lpVtbl, NULL);
862 return (IUnknown*) &This->lpVtbl;