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 );
333 FIXME("(%p)->(%p %p %p) needs tests\n", This, newNode, oldNode, outOldNode);
335 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
338 static HRESULT WINAPI domcdata_removeChild(
339 IXMLDOMCDATASection *iface,
340 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
342 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
343 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
346 static HRESULT WINAPI domcdata_appendChild(
347 IXMLDOMCDATASection *iface,
348 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
350 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
351 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
354 static HRESULT WINAPI domcdata_hasChildNodes(
355 IXMLDOMCDATASection *iface,
358 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
359 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
362 static HRESULT WINAPI domcdata_get_ownerDocument(
363 IXMLDOMCDATASection *iface,
364 IXMLDOMDocument** domDocument)
366 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
367 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
370 static HRESULT WINAPI domcdata_cloneNode(
371 IXMLDOMCDATASection *iface,
372 VARIANT_BOOL deep, IXMLDOMNode** outNode)
374 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
375 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
376 return node_clone( &This->node, deep, outNode );
379 static HRESULT WINAPI domcdata_get_nodeTypeString(
380 IXMLDOMCDATASection *iface,
383 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
384 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
387 static HRESULT WINAPI domcdata_get_text(
388 IXMLDOMCDATASection *iface,
391 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
392 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
395 static HRESULT WINAPI domcdata_put_text(
396 IXMLDOMCDATASection *iface,
399 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
400 TRACE("(%p)->(%p)\n", This, debugstr_w(p));
401 return node_put_text( &This->node, p );
404 static HRESULT WINAPI domcdata_get_specified(
405 IXMLDOMCDATASection *iface,
406 VARIANT_BOOL* isSpecified)
408 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
409 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
410 *isSpecified = VARIANT_TRUE;
414 static HRESULT WINAPI domcdata_get_definition(
415 IXMLDOMCDATASection *iface,
416 IXMLDOMNode** definitionNode)
418 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
419 FIXME("(%p)->(%p)\n", This, definitionNode);
423 static HRESULT WINAPI domcdata_get_nodeTypedValue(
424 IXMLDOMCDATASection *iface,
427 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
428 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
431 static HRESULT WINAPI domcdata_put_nodeTypedValue(
432 IXMLDOMCDATASection *iface,
435 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
436 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
439 static HRESULT WINAPI domcdata_get_dataType(
440 IXMLDOMCDATASection *iface,
443 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
444 TRACE("(%p)->(%p)\n", This, typename);
445 return return_null_var( typename );
448 static HRESULT WINAPI domcdata_put_dataType(
449 IXMLDOMCDATASection *iface,
452 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
453 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
456 static HRESULT WINAPI domcdata_get_xml(
457 IXMLDOMCDATASection *iface,
460 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
462 TRACE("(%p)->(%p)\n", This, p);
464 return node_get_xml(&This->node, FALSE, FALSE, p);
467 static HRESULT WINAPI domcdata_transformNode(
468 IXMLDOMCDATASection *iface,
469 IXMLDOMNode* domNode, BSTR* p)
471 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
472 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
475 static HRESULT WINAPI domcdata_selectNodes(
476 IXMLDOMCDATASection *iface,
477 BSTR p, IXMLDOMNodeList** outList)
479 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
480 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
483 static HRESULT WINAPI domcdata_selectSingleNode(
484 IXMLDOMCDATASection *iface,
485 BSTR p, IXMLDOMNode** outNode)
487 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
488 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
491 static HRESULT WINAPI domcdata_get_parsed(
492 IXMLDOMCDATASection *iface,
493 VARIANT_BOOL* isParsed)
495 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
496 FIXME("(%p)->(%p) stub!\n", This, isParsed);
497 *isParsed = VARIANT_TRUE;
501 static HRESULT WINAPI domcdata_get_namespaceURI(
502 IXMLDOMCDATASection *iface,
505 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
506 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
509 static HRESULT WINAPI domcdata_get_prefix(
510 IXMLDOMCDATASection *iface,
513 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
514 TRACE("(%p)->(%p)\n", This, prefix);
515 return return_null_bstr( prefix );
518 static HRESULT WINAPI domcdata_get_baseName(
519 IXMLDOMCDATASection *iface,
522 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
523 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
526 static HRESULT WINAPI domcdata_transformNodeToObject(
527 IXMLDOMCDATASection *iface,
528 IXMLDOMNode* domNode, VARIANT var1)
530 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
531 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
534 static HRESULT WINAPI domcdata_get_data(
535 IXMLDOMCDATASection *iface,
544 hr = IXMLDOMCDATASection_get_nodeValue( iface, &vRet );
553 static HRESULT WINAPI domcdata_put_data(
554 IXMLDOMCDATASection *iface,
557 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
560 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
562 V_VT(&val) = VT_BSTR;
565 return IXMLDOMCDATASection_put_nodeValue( iface, val );
568 static HRESULT WINAPI domcdata_get_length(
569 IXMLDOMCDATASection *iface,
572 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
576 TRACE("(%p)->(%p)\n", This, len);
581 hr = IXMLDOMCDATASection_get_data(iface, &data);
584 *len = SysStringLen(data);
591 static HRESULT WINAPI domcdata_substringData(
592 IXMLDOMCDATASection *iface,
593 LONG offset, LONG count, BSTR *p)
595 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
599 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
605 if(offset < 0 || count < 0)
611 hr = IXMLDOMCDATASection_get_data(iface, &data);
614 LONG len = SysStringLen(data);
618 if(offset + count > len)
619 *p = SysAllocString(&data[offset]);
621 *p = SysAllocStringLen(&data[offset], count);
632 static HRESULT WINAPI domcdata_appendData(
633 IXMLDOMCDATASection *iface,
636 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
641 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
643 /* Nothing to do if NULL or an Empty string passed in. */
644 if((p_len = SysStringLen(p)) == 0) return S_OK;
646 hr = IXMLDOMCDATASection_get_data(iface, &data);
649 LONG len = SysStringLen(data);
650 BSTR str = SysAllocStringLen(NULL, p_len + len);
652 memcpy(str, data, len*sizeof(WCHAR));
653 memcpy(&str[len], p, p_len*sizeof(WCHAR));
656 hr = IXMLDOMCDATASection_put_data(iface, str);
665 static HRESULT WINAPI domcdata_insertData(
666 IXMLDOMCDATASection *iface,
669 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
674 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
676 /* If have a NULL or empty string, don't do anything. */
677 if((p_len = SysStringLen(p)) == 0)
685 hr = IXMLDOMCDATASection_get_data(iface, &data);
688 LONG len = SysStringLen(data);
697 str = SysAllocStringLen(NULL, len + p_len);
698 /* start part, supplied string and end part */
699 memcpy(str, data, offset*sizeof(WCHAR));
700 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
701 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
704 hr = IXMLDOMCDATASection_put_data(iface, str);
713 static HRESULT WINAPI domcdata_deleteData(
714 IXMLDOMCDATASection *iface,
715 LONG offset, LONG count)
717 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
722 TRACE("(%p)->(%d %d)\n", This, offset, count);
724 hr = IXMLDOMCDATASection_get_length(iface, &len);
725 if(hr != S_OK) return hr;
727 if((offset < 0) || (offset > len) || (count < 0))
730 if(len == 0) return S_OK;
732 /* cutting start or end */
733 if((offset == 0) || ((count + offset) >= len))
736 IXMLDOMCDATASection_substringData(iface, count, len - count, &str);
738 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
739 hr = IXMLDOMCDATASection_put_data(iface, str);
742 /* cutting from the inside */
746 IXMLDOMCDATASection_substringData(iface, 0, offset, &str);
747 IXMLDOMCDATASection_substringData(iface, offset + count, len - count, &str_end);
749 hr = IXMLDOMCDATASection_put_data(iface, str);
751 hr = IXMLDOMCDATASection_appendData(iface, str_end);
753 SysFreeString(str_end);
761 static HRESULT WINAPI domcdata_replaceData(
762 IXMLDOMCDATASection *iface,
763 LONG offset, LONG count, BSTR p)
765 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
768 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
770 hr = IXMLDOMCDATASection_deleteData(iface, offset, count);
773 hr = IXMLDOMCDATASection_insertData(iface, offset, p);
778 static HRESULT WINAPI domcdata_splitText(
779 IXMLDOMCDATASection *iface,
780 LONG offset, IXMLDOMText **txtNode)
782 domcdata *This = impl_from_IXMLDOMCDATASection( iface );
783 IXMLDOMDocument *doc;
787 TRACE("(%p)->(%d %p)\n", This, offset, txtNode);
789 if (!txtNode || offset < 0) return E_INVALIDARG;
793 IXMLDOMCDATASection_get_length(iface, &length);
795 if (offset > length) return E_INVALIDARG;
796 if (offset == length) return S_FALSE;
798 hr = IXMLDOMCDATASection_get_ownerDocument(iface, &doc);
803 hr = IXMLDOMCDATASection_substringData(iface, offset, length - offset, &data);
806 hr = IXMLDOMDocument_createTextNode(doc, data, txtNode);
811 hr = IXMLDOMCDATASection_get_parentNode(iface, &parent);
814 IXMLDOMCDATASection_deleteData(iface, 0, offset);
815 hr = IXMLDOMNode_appendChild(parent, (IXMLDOMNode*)*txtNode, NULL);
820 IXMLDOMDocument_Release(doc);
826 static const struct IXMLDOMCDATASectionVtbl domcdata_vtbl =
828 domcdata_QueryInterface,
831 domcdata_GetTypeInfoCount,
832 domcdata_GetTypeInfo,
833 domcdata_GetIDsOfNames,
835 domcdata_get_nodeName,
836 domcdata_get_nodeValue,
837 domcdata_put_nodeValue,
838 domcdata_get_nodeType,
839 domcdata_get_parentNode,
840 domcdata_get_childNodes,
841 domcdata_get_firstChild,
842 domcdata_get_lastChild,
843 domcdata_get_previousSibling,
844 domcdata_get_nextSibling,
845 domcdata_get_attributes,
846 domcdata_insertBefore,
847 domcdata_replaceChild,
848 domcdata_removeChild,
849 domcdata_appendChild,
850 domcdata_hasChildNodes,
851 domcdata_get_ownerDocument,
853 domcdata_get_nodeTypeString,
856 domcdata_get_specified,
857 domcdata_get_definition,
858 domcdata_get_nodeTypedValue,
859 domcdata_put_nodeTypedValue,
860 domcdata_get_dataType,
861 domcdata_put_dataType,
863 domcdata_transformNode,
864 domcdata_selectNodes,
865 domcdata_selectSingleNode,
867 domcdata_get_namespaceURI,
869 domcdata_get_baseName,
870 domcdata_transformNodeToObject,
874 domcdata_substringData,
878 domcdata_replaceData,
882 IUnknown* create_cdata( xmlNodePtr text )
886 This = heap_alloc( sizeof *This );
890 This->lpVtbl = &domcdata_vtbl;
893 init_xmlnode(&This->node, text, (IXMLDOMNode*)&This->lpVtbl, NULL);
895 return (IUnknown*) &This->lpVtbl;