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
27 # include <libxml/parser.h>
28 # include <libxml/xmlerror.h>
37 #include "msxml_private.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(msxml
);
48 IXMLDOMCDATASection IXMLDOMCDATASection_iface
;
52 static const tid_t domcdata_se_tids
[] = {
54 IXMLDOMCDATASection_tid
,
58 static inline domcdata
*impl_from_IXMLDOMCDATASection( IXMLDOMCDATASection
*iface
)
60 return CONTAINING_RECORD(iface
, domcdata
, IXMLDOMCDATASection_iface
);
63 static HRESULT WINAPI
domcdata_QueryInterface(
64 IXMLDOMCDATASection
*iface
,
68 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
69 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppvObject
);
71 if ( IsEqualGUID( riid
, &IID_IXMLDOMCDATASection
) ||
72 IsEqualGUID( riid
, &IID_IXMLDOMCharacterData
) ||
73 IsEqualGUID( riid
, &IID_IXMLDOMNode
) ||
74 IsEqualGUID( riid
, &IID_IDispatch
) ||
75 IsEqualGUID( riid
, &IID_IUnknown
) )
79 else if(node_query_interface(&This
->node
, riid
, ppvObject
))
81 return *ppvObject
? S_OK
: E_NOINTERFACE
;
83 else if(IsEqualGUID( riid
, &IID_ISupportErrorInfo
))
85 return node_create_supporterrorinfo(domcdata_se_tids
, ppvObject
);
89 TRACE("Unsupported interface %s\n", debugstr_guid(riid
));
94 IXMLDOMCDATASection_AddRef(iface
);
98 static ULONG WINAPI
domcdata_AddRef(
99 IXMLDOMCDATASection
*iface
)
101 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
102 ULONG ref
= InterlockedIncrement( &This
->ref
);
103 TRACE("(%p)->(%d)\n", This
, ref
);
107 static ULONG WINAPI
domcdata_Release(
108 IXMLDOMCDATASection
*iface
)
110 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
111 ULONG ref
= InterlockedDecrement( &This
->ref
);
113 TRACE("(%p)->(%d)\n", This
, ref
);
116 destroy_xmlnode(&This
->node
);
123 static HRESULT WINAPI
domcdata_GetTypeInfoCount(
124 IXMLDOMCDATASection
*iface
,
127 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
128 return IDispatchEx_GetTypeInfoCount(&This
->node
.dispex
.IDispatchEx_iface
, pctinfo
);
131 static HRESULT WINAPI
domcdata_GetTypeInfo(
132 IXMLDOMCDATASection
*iface
,
133 UINT iTInfo
, LCID lcid
,
134 ITypeInfo
** ppTInfo
)
136 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
137 return IDispatchEx_GetTypeInfo(&This
->node
.dispex
.IDispatchEx_iface
,
138 iTInfo
, lcid
, ppTInfo
);
141 static HRESULT WINAPI
domcdata_GetIDsOfNames(
142 IXMLDOMCDATASection
*iface
,
143 REFIID riid
, LPOLESTR
* rgszNames
,
144 UINT cNames
, LCID lcid
, DISPID
* rgDispId
)
146 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
147 return IDispatchEx_GetIDsOfNames(&This
->node
.dispex
.IDispatchEx_iface
,
148 riid
, rgszNames
, cNames
, lcid
, rgDispId
);
151 static HRESULT WINAPI
domcdata_Invoke(
152 IXMLDOMCDATASection
*iface
,
153 DISPID dispIdMember
, REFIID riid
, LCID lcid
,
154 WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarResult
,
155 EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
157 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
158 return IDispatchEx_Invoke(&This
->node
.dispex
.IDispatchEx_iface
,
159 dispIdMember
, riid
, lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
162 static HRESULT WINAPI
domcdata_get_nodeName(
163 IXMLDOMCDATASection
*iface
,
166 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
168 static const WCHAR cdata_sectionW
[] =
169 {'#','c','d','a','t','a','-','s','e','c','t','i','o','n',0};
171 TRACE("(%p)->(%p)\n", This
, p
);
173 return return_bstr(cdata_sectionW
, p
);
176 static HRESULT WINAPI
domcdata_get_nodeValue(
177 IXMLDOMCDATASection
*iface
,
180 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
182 TRACE("(%p)->(%p)\n", This
, value
);
184 return node_get_content(&This
->node
, value
);
187 static HRESULT WINAPI
domcdata_put_nodeValue(
188 IXMLDOMCDATASection
*iface
,
191 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
193 TRACE("(%p)->(%s)\n", This
, debugstr_variant(&value
));
195 return node_put_value(&This
->node
, &value
);
198 static HRESULT WINAPI
domcdata_get_nodeType(
199 IXMLDOMCDATASection
*iface
,
200 DOMNodeType
* domNodeType
)
202 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
204 TRACE("(%p)->(%p)\n", This
, domNodeType
);
206 *domNodeType
= NODE_CDATA_SECTION
;
210 static HRESULT WINAPI
domcdata_get_parentNode(
211 IXMLDOMCDATASection
*iface
,
212 IXMLDOMNode
** parent
)
214 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
216 TRACE("(%p)->(%p)\n", This
, parent
);
218 return node_get_parent(&This
->node
, parent
);
221 static HRESULT WINAPI
domcdata_get_childNodes(
222 IXMLDOMCDATASection
*iface
,
223 IXMLDOMNodeList
** outList
)
225 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
227 TRACE("(%p)->(%p)\n", This
, outList
);
229 return node_get_child_nodes(&This
->node
, outList
);
232 static HRESULT WINAPI
domcdata_get_firstChild(
233 IXMLDOMCDATASection
*iface
,
234 IXMLDOMNode
** domNode
)
236 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
238 TRACE("(%p)->(%p)\n", This
, domNode
);
240 return return_null_node(domNode
);
243 static HRESULT WINAPI
domcdata_get_lastChild(
244 IXMLDOMCDATASection
*iface
,
245 IXMLDOMNode
** domNode
)
247 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
249 TRACE("(%p)->(%p)\n", This
, domNode
);
251 return return_null_node(domNode
);
254 static HRESULT WINAPI
domcdata_get_previousSibling(
255 IXMLDOMCDATASection
*iface
,
256 IXMLDOMNode
** domNode
)
258 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
260 TRACE("(%p)->(%p)\n", This
, domNode
);
262 return node_get_previous_sibling(&This
->node
, domNode
);
265 static HRESULT WINAPI
domcdata_get_nextSibling(
266 IXMLDOMCDATASection
*iface
,
267 IXMLDOMNode
** domNode
)
269 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
271 TRACE("(%p)->(%p)\n", This
, domNode
);
273 return node_get_next_sibling(&This
->node
, domNode
);
276 static HRESULT WINAPI
domcdata_get_attributes(
277 IXMLDOMCDATASection
*iface
,
278 IXMLDOMNamedNodeMap
** attributeMap
)
280 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
282 TRACE("(%p)->(%p)\n", This
, attributeMap
);
284 return return_null_ptr((void**)attributeMap
);
287 static HRESULT WINAPI
domcdata_insertBefore(
288 IXMLDOMCDATASection
*iface
,
289 IXMLDOMNode
* newNode
, VARIANT refChild
,
290 IXMLDOMNode
** outOldNode
)
292 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
293 TRACE("(%p)->(%p %s %p)\n", This
, newNode
, debugstr_variant(&refChild
), outOldNode
);
294 if (outOldNode
) *outOldNode
= NULL
;
298 static HRESULT WINAPI
domcdata_replaceChild(
299 IXMLDOMCDATASection
*iface
,
300 IXMLDOMNode
* newNode
,
301 IXMLDOMNode
* oldNode
,
302 IXMLDOMNode
** outOldNode
)
304 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
305 TRACE("(%p)->(%p %p %p)\n", This
, newNode
, oldNode
, outOldNode
);
306 if (outOldNode
) *outOldNode
= NULL
;
310 static HRESULT WINAPI
domcdata_removeChild(
311 IXMLDOMCDATASection
*iface
,
312 IXMLDOMNode
*child
, IXMLDOMNode
**oldChild
)
314 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
315 TRACE("(%p)->(%p %p)\n", This
, child
, oldChild
);
316 if (oldChild
) *oldChild
= NULL
;
320 static HRESULT WINAPI
domcdata_appendChild(
321 IXMLDOMCDATASection
*iface
,
322 IXMLDOMNode
*child
, IXMLDOMNode
**outChild
)
324 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
325 TRACE("(%p)->(%p %p)\n", This
, child
, outChild
);
326 if (outChild
) *outChild
= NULL
;
330 static HRESULT WINAPI
domcdata_hasChildNodes(
331 IXMLDOMCDATASection
*iface
,
334 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
335 TRACE("(%p)->(%p)\n", This
, ret
);
336 return return_var_false(ret
);
339 static HRESULT WINAPI
domcdata_get_ownerDocument(
340 IXMLDOMCDATASection
*iface
,
341 IXMLDOMDocument
**doc
)
343 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
344 TRACE("(%p)->(%p)\n", This
, doc
);
345 return node_get_owner_doc(&This
->node
, doc
);
348 static HRESULT WINAPI
domcdata_cloneNode(
349 IXMLDOMCDATASection
*iface
,
350 VARIANT_BOOL deep
, IXMLDOMNode
** outNode
)
352 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
353 TRACE("(%p)->(%d %p)\n", This
, deep
, outNode
);
354 return node_clone( &This
->node
, deep
, outNode
);
357 static HRESULT WINAPI
domcdata_get_nodeTypeString(
358 IXMLDOMCDATASection
*iface
,
361 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
362 static const WCHAR cdatasectionW
[] = {'c','d','a','t','a','s','e','c','t','i','o','n',0};
364 TRACE("(%p)->(%p)\n", This
, p
);
366 return return_bstr(cdatasectionW
, p
);
369 static HRESULT WINAPI
domcdata_get_text(
370 IXMLDOMCDATASection
*iface
,
373 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
374 TRACE("(%p)->(%p)\n", This
, p
);
375 return node_get_text(&This
->node
, p
);
378 static HRESULT WINAPI
domcdata_put_text(
379 IXMLDOMCDATASection
*iface
,
382 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
383 TRACE("(%p)->(%s)\n", This
, debugstr_w(p
));
384 return node_put_text( &This
->node
, p
);
387 static HRESULT WINAPI
domcdata_get_specified(
388 IXMLDOMCDATASection
*iface
,
389 VARIANT_BOOL
* isSpecified
)
391 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
392 FIXME("(%p)->(%p) stub!\n", This
, isSpecified
);
393 *isSpecified
= VARIANT_TRUE
;
397 static HRESULT WINAPI
domcdata_get_definition(
398 IXMLDOMCDATASection
*iface
,
399 IXMLDOMNode
** definitionNode
)
401 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
402 FIXME("(%p)->(%p)\n", This
, definitionNode
);
406 static HRESULT WINAPI
domcdata_get_nodeTypedValue(
407 IXMLDOMCDATASection
*iface
,
410 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
411 TRACE("(%p)->(%p)\n", This
, v
);
412 return node_get_content(&This
->node
, v
);
415 static HRESULT WINAPI
domcdata_put_nodeTypedValue(
416 IXMLDOMCDATASection
*iface
,
419 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
420 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&typedValue
));
424 static HRESULT WINAPI
domcdata_get_dataType(
425 IXMLDOMCDATASection
*iface
,
428 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
429 TRACE("(%p)->(%p)\n", This
, typename
);
430 return return_null_var( typename
);
433 static HRESULT WINAPI
domcdata_put_dataType(
434 IXMLDOMCDATASection
*iface
,
437 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
439 TRACE("(%p)->(%s)\n", This
, debugstr_w(p
));
447 static HRESULT WINAPI
domcdata_get_xml(
448 IXMLDOMCDATASection
*iface
,
451 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
453 TRACE("(%p)->(%p)\n", This
, p
);
455 return node_get_xml(&This
->node
, FALSE
, p
);
458 static HRESULT WINAPI
domcdata_transformNode(
459 IXMLDOMCDATASection
*iface
,
460 IXMLDOMNode
*node
, BSTR
*p
)
462 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
463 TRACE("(%p)->(%p %p)\n", This
, node
, p
);
464 return node_transform_node(&This
->node
, node
, p
);
467 static HRESULT WINAPI
domcdata_selectNodes(
468 IXMLDOMCDATASection
*iface
,
469 BSTR p
, IXMLDOMNodeList
** outList
)
471 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
472 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(p
), outList
);
473 return node_select_nodes(&This
->node
, p
, outList
);
476 static HRESULT WINAPI
domcdata_selectSingleNode(
477 IXMLDOMCDATASection
*iface
,
478 BSTR p
, IXMLDOMNode
** outNode
)
480 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
481 TRACE("(%p)->(%s %p)\n", This
, debugstr_w(p
), outNode
);
482 return node_select_singlenode(&This
->node
, p
, outNode
);
485 static HRESULT WINAPI
domcdata_get_parsed(
486 IXMLDOMCDATASection
*iface
,
487 VARIANT_BOOL
* isParsed
)
489 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
490 FIXME("(%p)->(%p) stub!\n", This
, isParsed
);
491 *isParsed
= VARIANT_TRUE
;
495 static HRESULT WINAPI
domcdata_get_namespaceURI(
496 IXMLDOMCDATASection
*iface
,
499 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
500 TRACE("(%p)->(%p)\n", This
, p
);
501 return node_get_namespaceURI(&This
->node
, p
);
504 static HRESULT WINAPI
domcdata_get_prefix(
505 IXMLDOMCDATASection
*iface
,
508 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
509 TRACE("(%p)->(%p)\n", This
, prefix
);
510 return return_null_bstr( prefix
);
513 static HRESULT WINAPI
domcdata_get_baseName(
514 IXMLDOMCDATASection
*iface
,
517 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
518 FIXME("(%p)->(%p): needs test\n", This
, name
);
519 return return_null_bstr( name
);
522 static HRESULT WINAPI
domcdata_transformNodeToObject(
523 IXMLDOMCDATASection
*iface
,
524 IXMLDOMNode
* domNode
, VARIANT var1
)
526 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
527 FIXME("(%p)->(%p %s)\n", This
, domNode
, debugstr_variant(&var1
));
531 static HRESULT WINAPI
domcdata_get_data(
532 IXMLDOMCDATASection
*iface
,
541 hr
= IXMLDOMCDATASection_get_nodeValue( iface
, &vRet
);
550 static HRESULT WINAPI
domcdata_put_data(
551 IXMLDOMCDATASection
*iface
,
554 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
555 TRACE("(%p)->(%s)\n", This
, debugstr_w(data
));
556 return node_set_content(&This
->node
, data
);
559 static HRESULT WINAPI
domcdata_get_length(
560 IXMLDOMCDATASection
*iface
,
563 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
567 TRACE("(%p)->(%p)\n", This
, len
);
572 hr
= IXMLDOMCDATASection_get_data(iface
, &data
);
575 *len
= SysStringLen(data
);
582 static HRESULT WINAPI
domcdata_substringData(
583 IXMLDOMCDATASection
*iface
,
584 LONG offset
, LONG count
, BSTR
*p
)
586 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
590 TRACE("(%p)->(%d %d %p)\n", This
, offset
, count
, p
);
596 if(offset
< 0 || count
< 0)
602 hr
= IXMLDOMCDATASection_get_data(iface
, &data
);
605 LONG len
= SysStringLen(data
);
609 if(offset
+ count
> len
)
610 *p
= SysAllocString(&data
[offset
]);
612 *p
= SysAllocStringLen(&data
[offset
], count
);
623 static HRESULT WINAPI
domcdata_appendData(
624 IXMLDOMCDATASection
*iface
,
627 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
632 TRACE("(%p)->(%s)\n", This
, debugstr_w(p
));
634 /* Nothing to do if NULL or an Empty string passed in. */
635 if((p_len
= SysStringLen(p
)) == 0) return S_OK
;
637 hr
= IXMLDOMCDATASection_get_data(iface
, &data
);
640 LONG len
= SysStringLen(data
);
641 BSTR str
= SysAllocStringLen(NULL
, p_len
+ len
);
643 memcpy(str
, data
, len
*sizeof(WCHAR
));
644 memcpy(&str
[len
], p
, p_len
*sizeof(WCHAR
));
647 hr
= IXMLDOMCDATASection_put_data(iface
, str
);
656 static HRESULT WINAPI
domcdata_insertData(
657 IXMLDOMCDATASection
*iface
,
660 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
665 TRACE("(%p)->(%d %s)\n", This
, offset
, debugstr_w(p
));
667 /* If have a NULL or empty string, don't do anything. */
668 if((p_len
= SysStringLen(p
)) == 0)
676 hr
= IXMLDOMCDATASection_get_data(iface
, &data
);
679 LONG len
= SysStringLen(data
);
688 str
= SysAllocStringLen(NULL
, len
+ p_len
);
689 /* start part, supplied string and end part */
690 memcpy(str
, data
, offset
*sizeof(WCHAR
));
691 memcpy(&str
[offset
], p
, p_len
*sizeof(WCHAR
));
692 memcpy(&str
[offset
+p_len
], &data
[offset
], (len
-offset
)*sizeof(WCHAR
));
695 hr
= IXMLDOMCDATASection_put_data(iface
, str
);
704 static HRESULT WINAPI
domcdata_deleteData(
705 IXMLDOMCDATASection
*iface
,
706 LONG offset
, LONG count
)
708 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
713 TRACE("(%p)->(%d %d)\n", This
, offset
, count
);
715 hr
= IXMLDOMCDATASection_get_length(iface
, &len
);
716 if(hr
!= S_OK
) return hr
;
718 if((offset
< 0) || (offset
> len
) || (count
< 0))
721 if(len
== 0) return S_OK
;
723 /* cutting start or end */
724 if((offset
== 0) || ((count
+ offset
) >= len
))
727 IXMLDOMCDATASection_substringData(iface
, count
, len
- count
, &str
);
729 IXMLDOMCDATASection_substringData(iface
, 0, offset
, &str
);
730 hr
= IXMLDOMCDATASection_put_data(iface
, str
);
733 /* cutting from the inside */
737 IXMLDOMCDATASection_substringData(iface
, 0, offset
, &str
);
738 IXMLDOMCDATASection_substringData(iface
, offset
+ count
, len
- count
, &str_end
);
740 hr
= IXMLDOMCDATASection_put_data(iface
, str
);
742 hr
= IXMLDOMCDATASection_appendData(iface
, str_end
);
744 SysFreeString(str_end
);
752 static HRESULT WINAPI
domcdata_replaceData(
753 IXMLDOMCDATASection
*iface
,
754 LONG offset
, LONG count
, BSTR p
)
756 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
759 TRACE("(%p)->(%d %d %s)\n", This
, offset
, count
, debugstr_w(p
));
761 hr
= IXMLDOMCDATASection_deleteData(iface
, offset
, count
);
764 hr
= IXMLDOMCDATASection_insertData(iface
, offset
, p
);
769 static HRESULT WINAPI
domcdata_splitText(
770 IXMLDOMCDATASection
*iface
,
771 LONG offset
, IXMLDOMText
**txtNode
)
773 domcdata
*This
= impl_from_IXMLDOMCDATASection( iface
);
774 IXMLDOMDocument
*doc
;
778 TRACE("(%p)->(%d %p)\n", This
, offset
, txtNode
);
780 if (!txtNode
|| offset
< 0) return E_INVALIDARG
;
784 IXMLDOMCDATASection_get_length(iface
, &length
);
786 if (offset
> length
) return E_INVALIDARG
;
787 if (offset
== length
) return S_FALSE
;
789 hr
= IXMLDOMCDATASection_get_ownerDocument(iface
, &doc
);
794 hr
= IXMLDOMCDATASection_substringData(iface
, offset
, length
- offset
, &data
);
797 hr
= IXMLDOMDocument_createTextNode(doc
, data
, txtNode
);
802 hr
= IXMLDOMCDATASection_get_parentNode(iface
, &parent
);
805 IXMLDOMCDATASection_deleteData(iface
, 0, offset
);
806 hr
= IXMLDOMNode_appendChild(parent
, (IXMLDOMNode
*)*txtNode
, NULL
);
807 IXMLDOMNode_Release(parent
);
812 IXMLDOMDocument_Release(doc
);
818 static const struct IXMLDOMCDATASectionVtbl domcdata_vtbl
=
820 domcdata_QueryInterface
,
823 domcdata_GetTypeInfoCount
,
824 domcdata_GetTypeInfo
,
825 domcdata_GetIDsOfNames
,
827 domcdata_get_nodeName
,
828 domcdata_get_nodeValue
,
829 domcdata_put_nodeValue
,
830 domcdata_get_nodeType
,
831 domcdata_get_parentNode
,
832 domcdata_get_childNodes
,
833 domcdata_get_firstChild
,
834 domcdata_get_lastChild
,
835 domcdata_get_previousSibling
,
836 domcdata_get_nextSibling
,
837 domcdata_get_attributes
,
838 domcdata_insertBefore
,
839 domcdata_replaceChild
,
840 domcdata_removeChild
,
841 domcdata_appendChild
,
842 domcdata_hasChildNodes
,
843 domcdata_get_ownerDocument
,
845 domcdata_get_nodeTypeString
,
848 domcdata_get_specified
,
849 domcdata_get_definition
,
850 domcdata_get_nodeTypedValue
,
851 domcdata_put_nodeTypedValue
,
852 domcdata_get_dataType
,
853 domcdata_put_dataType
,
855 domcdata_transformNode
,
856 domcdata_selectNodes
,
857 domcdata_selectSingleNode
,
859 domcdata_get_namespaceURI
,
861 domcdata_get_baseName
,
862 domcdata_transformNodeToObject
,
866 domcdata_substringData
,
870 domcdata_replaceData
,
874 static const tid_t domcdata_iface_tids
[] = {
875 IXMLDOMCDATASection_tid
,
879 static dispex_static_data_t domcdata_dispex
= {
881 IXMLDOMCDATASection_tid
,
886 IUnknown
* create_cdata( xmlNodePtr text
)
890 This
= heap_alloc( sizeof *This
);
894 This
->IXMLDOMCDATASection_iface
.lpVtbl
= &domcdata_vtbl
;
897 init_xmlnode(&This
->node
, text
, (IXMLDOMNode
*)&This
->IXMLDOMCDATASection_iface
, &domcdata_dispex
);
899 return (IUnknown
*)&This
->IXMLDOMCDATASection_iface
;