wined3d: Use the FBO cache in stretch_rect_fbo().
[wine/hramrach.git] / dlls / msxml3 / text.c
blobfdcb06b4cb3b1fe79d1bbb8677efb468a41c1bbc
1 /*
2 * DOM text node implementation
4 * Copyright 2006 Huw Davies
5 * Copyright 2007-2008 Alistair Leslie-Hughes
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #define COBJMACROS
24 #include "config.h"
26 #include <stdarg.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winuser.h"
30 #include "ole2.h"
31 #include "msxml2.h"
33 #include "msxml_private.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
39 #ifdef HAVE_LIBXML2
41 typedef struct _domtext
43 xmlnode node;
44 const struct IXMLDOMTextVtbl *lpVtbl;
45 LONG ref;
46 } domtext;
48 static inline domtext *impl_from_IXMLDOMText( IXMLDOMText *iface )
50 return (domtext *)((char*)iface - FIELD_OFFSET(domtext, lpVtbl));
53 static HRESULT WINAPI domtext_QueryInterface(
54 IXMLDOMText *iface,
55 REFIID riid,
56 void** ppvObject )
58 domtext *This = impl_from_IXMLDOMText( iface );
59 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
61 if ( IsEqualGUID( riid, &IID_IXMLDOMText ) ||
62 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
63 IsEqualGUID( riid, &IID_IDispatch ) ||
64 IsEqualGUID( riid, &IID_IUnknown ) )
66 *ppvObject = iface;
68 else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
70 *ppvObject = IXMLDOMNode_from_impl(&This->node);
72 else if ( IsEqualGUID( riid, &IID_IXMLDOMElement ) ||
73 IsEqualGUID( riid, &IID_IXMLDOMCDATASection ) )
75 /* IXMLDOMText is known to be correct in not implementing these */
76 TRACE("Unsupported interface\n");
77 return E_NOINTERFACE;
79 else
81 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
82 return E_NOINTERFACE;
85 IXMLDOMText_AddRef((IUnknown*)*ppvObject);
86 return S_OK;
89 static ULONG WINAPI domtext_AddRef(
90 IXMLDOMText *iface )
92 domtext *This = impl_from_IXMLDOMText( iface );
93 return InterlockedIncrement( &This->ref );
96 static ULONG WINAPI domtext_Release(
97 IXMLDOMText *iface )
99 domtext *This = impl_from_IXMLDOMText( iface );
100 ULONG ref;
102 ref = InterlockedDecrement( &This->ref );
103 if ( ref == 0 )
105 destroy_xmlnode(&This->node);
106 heap_free( This );
109 return ref;
112 static HRESULT WINAPI domtext_GetTypeInfoCount(
113 IXMLDOMText *iface,
114 UINT* pctinfo )
116 domtext *This = impl_from_IXMLDOMText( iface );
118 TRACE("(%p)->(%p)\n", This, pctinfo);
120 *pctinfo = 1;
122 return S_OK;
125 static HRESULT WINAPI domtext_GetTypeInfo(
126 IXMLDOMText *iface,
127 UINT iTInfo, LCID lcid,
128 ITypeInfo** ppTInfo )
130 domtext *This = impl_from_IXMLDOMText( iface );
131 HRESULT hr;
133 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
135 hr = get_typeinfo(IXMLDOMText_tid, ppTInfo);
137 return hr;
140 static HRESULT WINAPI domtext_GetIDsOfNames(
141 IXMLDOMText *iface,
142 REFIID riid, LPOLESTR* rgszNames,
143 UINT cNames, LCID lcid, DISPID* rgDispId )
145 domtext *This = impl_from_IXMLDOMText( iface );
146 ITypeInfo *typeinfo;
147 HRESULT hr;
149 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
150 lcid, rgDispId);
152 if(!rgszNames || cNames == 0 || !rgDispId)
153 return E_INVALIDARG;
155 hr = get_typeinfo(IXMLDOMText_tid, &typeinfo);
156 if(SUCCEEDED(hr))
158 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
159 ITypeInfo_Release(typeinfo);
162 return hr;
165 static HRESULT WINAPI domtext_Invoke(
166 IXMLDOMText *iface,
167 DISPID dispIdMember, REFIID riid, LCID lcid,
168 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
169 EXCEPINFO* pExcepInfo, UINT* puArgErr )
171 domtext *This = impl_from_IXMLDOMText( iface );
172 ITypeInfo *typeinfo;
173 HRESULT hr;
175 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
176 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
178 hr = get_typeinfo(IXMLDOMText_tid, &typeinfo);
179 if(SUCCEEDED(hr))
181 hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
182 pVarResult, pExcepInfo, puArgErr);
183 ITypeInfo_Release(typeinfo);
186 return hr;
189 static HRESULT WINAPI domtext_get_nodeName(
190 IXMLDOMText *iface,
191 BSTR* p )
193 domtext *This = impl_from_IXMLDOMText( iface );
194 return IXMLDOMNode_get_nodeName( IXMLDOMNode_from_impl(&This->node), p );
197 static HRESULT WINAPI domtext_get_nodeValue(
198 IXMLDOMText *iface,
199 VARIANT* var1 )
201 domtext *This = impl_from_IXMLDOMText( iface );
202 return IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), var1 );
205 static HRESULT WINAPI domtext_put_nodeValue(
206 IXMLDOMText *iface,
207 VARIANT var1 )
209 domtext *This = impl_from_IXMLDOMText( iface );
210 return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), var1 );
213 static HRESULT WINAPI domtext_get_nodeType(
214 IXMLDOMText *iface,
215 DOMNodeType* domNodeType )
217 domtext *This = impl_from_IXMLDOMText( iface );
218 return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(&This->node), domNodeType );
221 static HRESULT WINAPI domtext_get_parentNode(
222 IXMLDOMText *iface,
223 IXMLDOMNode** parent )
225 domtext *This = impl_from_IXMLDOMText( iface );
226 return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
229 static HRESULT WINAPI domtext_get_childNodes(
230 IXMLDOMText *iface,
231 IXMLDOMNodeList** outList)
233 domtext *This = impl_from_IXMLDOMText( iface );
234 return IXMLDOMNode_get_childNodes( IXMLDOMNode_from_impl(&This->node), outList );
237 static HRESULT WINAPI domtext_get_firstChild(
238 IXMLDOMText *iface,
239 IXMLDOMNode** domNode)
241 domtext *This = impl_from_IXMLDOMText( iface );
242 return IXMLDOMNode_get_firstChild( IXMLDOMNode_from_impl(&This->node), domNode );
245 static HRESULT WINAPI domtext_get_lastChild(
246 IXMLDOMText *iface,
247 IXMLDOMNode** domNode)
249 domtext *This = impl_from_IXMLDOMText( iface );
250 return IXMLDOMNode_get_lastChild( IXMLDOMNode_from_impl(&This->node), domNode );
253 static HRESULT WINAPI domtext_get_previousSibling(
254 IXMLDOMText *iface,
255 IXMLDOMNode** domNode)
257 domtext *This = impl_from_IXMLDOMText( iface );
258 return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(&This->node), domNode );
261 static HRESULT WINAPI domtext_get_nextSibling(
262 IXMLDOMText *iface,
263 IXMLDOMNode** domNode)
265 domtext *This = impl_from_IXMLDOMText( iface );
266 return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(&This->node), domNode );
269 static HRESULT WINAPI domtext_get_attributes(
270 IXMLDOMText *iface,
271 IXMLDOMNamedNodeMap** attributeMap)
273 domtext *This = impl_from_IXMLDOMText( iface );
274 return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
277 static HRESULT WINAPI domtext_insertBefore(
278 IXMLDOMText *iface,
279 IXMLDOMNode* newNode, VARIANT var1,
280 IXMLDOMNode** outOldNode)
282 domtext *This = impl_from_IXMLDOMText( iface );
283 return IXMLDOMNode_insertBefore( IXMLDOMNode_from_impl(&This->node), newNode, var1, outOldNode );
286 static HRESULT WINAPI domtext_replaceChild(
287 IXMLDOMText *iface,
288 IXMLDOMNode* newNode,
289 IXMLDOMNode* oldNode,
290 IXMLDOMNode** outOldNode)
292 domtext *This = impl_from_IXMLDOMText( iface );
293 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
296 static HRESULT WINAPI domtext_removeChild(
297 IXMLDOMText *iface,
298 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
300 domtext *This = impl_from_IXMLDOMText( iface );
301 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
304 static HRESULT WINAPI domtext_appendChild(
305 IXMLDOMText *iface,
306 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
308 domtext *This = impl_from_IXMLDOMText( iface );
309 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
312 static HRESULT WINAPI domtext_hasChildNodes(
313 IXMLDOMText *iface,
314 VARIANT_BOOL* pbool)
316 domtext *This = impl_from_IXMLDOMText( iface );
317 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
320 static HRESULT WINAPI domtext_get_ownerDocument(
321 IXMLDOMText *iface,
322 IXMLDOMDocument** domDocument)
324 domtext *This = impl_from_IXMLDOMText( iface );
325 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
328 static HRESULT WINAPI domtext_cloneNode(
329 IXMLDOMText *iface,
330 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
332 domtext *This = impl_from_IXMLDOMText( iface );
333 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
336 static HRESULT WINAPI domtext_get_nodeTypeString(
337 IXMLDOMText *iface,
338 BSTR* p)
340 domtext *This = impl_from_IXMLDOMText( iface );
341 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
344 static HRESULT WINAPI domtext_get_text(
345 IXMLDOMText *iface,
346 BSTR* p)
348 domtext *This = impl_from_IXMLDOMText( iface );
349 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
352 static HRESULT WINAPI domtext_put_text(
353 IXMLDOMText *iface,
354 BSTR p)
356 domtext *This = impl_from_IXMLDOMText( iface );
357 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
360 static HRESULT WINAPI domtext_get_specified(
361 IXMLDOMText *iface,
362 VARIANT_BOOL* pbool)
364 domtext *This = impl_from_IXMLDOMText( iface );
365 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
368 static HRESULT WINAPI domtext_get_definition(
369 IXMLDOMText *iface,
370 IXMLDOMNode** domNode)
372 domtext *This = impl_from_IXMLDOMText( iface );
373 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
376 static HRESULT WINAPI domtext_get_nodeTypedValue(
377 IXMLDOMText *iface,
378 VARIANT* var1)
380 domtext *This = impl_from_IXMLDOMText( iface );
381 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
384 static HRESULT WINAPI domtext_put_nodeTypedValue(
385 IXMLDOMText *iface,
386 VARIANT var1)
388 domtext *This = impl_from_IXMLDOMText( iface );
389 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
392 static HRESULT WINAPI domtext_get_dataType(
393 IXMLDOMText *iface,
394 VARIANT* var1)
396 domtext *This = impl_from_IXMLDOMText( iface );
397 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
400 static HRESULT WINAPI domtext_put_dataType(
401 IXMLDOMText *iface,
402 BSTR p)
404 domtext *This = impl_from_IXMLDOMText( iface );
405 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
408 static HRESULT WINAPI domtext_get_xml(
409 IXMLDOMText *iface,
410 BSTR* p)
412 domtext *This = impl_from_IXMLDOMText( iface );
413 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
416 static HRESULT WINAPI domtext_transformNode(
417 IXMLDOMText *iface,
418 IXMLDOMNode* domNode, BSTR* p)
420 domtext *This = impl_from_IXMLDOMText( iface );
421 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
424 static HRESULT WINAPI domtext_selectNodes(
425 IXMLDOMText *iface,
426 BSTR p, IXMLDOMNodeList** outList)
428 domtext *This = impl_from_IXMLDOMText( iface );
429 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
432 static HRESULT WINAPI domtext_selectSingleNode(
433 IXMLDOMText *iface,
434 BSTR p, IXMLDOMNode** outNode)
436 domtext *This = impl_from_IXMLDOMText( iface );
437 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
440 static HRESULT WINAPI domtext_get_parsed(
441 IXMLDOMText *iface,
442 VARIANT_BOOL* pbool)
444 domtext *This = impl_from_IXMLDOMText( iface );
445 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
448 static HRESULT WINAPI domtext_get_namespaceURI(
449 IXMLDOMText *iface,
450 BSTR* p)
452 domtext *This = impl_from_IXMLDOMText( iface );
453 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
456 static HRESULT WINAPI domtext_get_prefix(
457 IXMLDOMText *iface,
458 BSTR* p)
460 domtext *This = impl_from_IXMLDOMText( iface );
461 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
464 static HRESULT WINAPI domtext_get_baseName(
465 IXMLDOMText *iface,
466 BSTR* p)
468 domtext *This = impl_from_IXMLDOMText( iface );
469 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
472 static HRESULT WINAPI domtext_transformNodeToObject(
473 IXMLDOMText *iface,
474 IXMLDOMNode* domNode, VARIANT var1)
476 domtext *This = impl_from_IXMLDOMText( iface );
477 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
480 static HRESULT WINAPI domtext_get_data(
481 IXMLDOMText *iface,
482 BSTR *p)
484 domtext *This = impl_from_IXMLDOMText( iface );
485 HRESULT hr;
486 VARIANT vRet;
488 if(!p)
489 return E_INVALIDARG;
491 hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet );
492 if(hr == S_OK)
494 *p = V_BSTR(&vRet);
497 return hr;
500 static HRESULT WINAPI domtext_put_data(
501 IXMLDOMText *iface,
502 BSTR data)
504 domtext *This = impl_from_IXMLDOMText( iface );
505 VARIANT val;
507 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
509 V_VT(&val) = VT_BSTR;
510 V_BSTR(&val) = data;
512 return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), val );
515 static HRESULT WINAPI domtext_get_length(
516 IXMLDOMText *iface,
517 LONG *len)
519 domtext *This = impl_from_IXMLDOMText( iface );
520 HRESULT hr;
521 BSTR data;
523 TRACE("(%p)->(%p)\n", This, len);
525 if(!len)
526 return E_INVALIDARG;
528 hr = IXMLDOMText_get_data(iface, &data);
529 if(hr == S_OK)
531 *len = SysStringLen(data);
532 SysFreeString(data);
535 return hr;
538 static HRESULT WINAPI domtext_substringData(
539 IXMLDOMText *iface,
540 LONG offset, LONG count, BSTR *p)
542 domtext *This = impl_from_IXMLDOMText( iface );
543 HRESULT hr;
544 BSTR data;
546 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
548 if(!p)
549 return E_INVALIDARG;
551 *p = NULL;
552 if(offset < 0 || count < 0)
553 return E_INVALIDARG;
555 if(count == 0)
556 return S_FALSE;
558 hr = IXMLDOMText_get_data(iface, &data);
559 if(hr == S_OK)
561 LONG len = SysStringLen(data);
563 if(offset < len)
565 if(offset + count > len)
566 *p = SysAllocString(&data[offset]);
567 else
568 *p = SysAllocStringLen(&data[offset], count);
570 else
571 hr = S_FALSE;
573 SysFreeString(data);
576 return hr;
579 static HRESULT WINAPI domtext_appendData(
580 IXMLDOMText *iface,
581 BSTR p)
583 domtext *This = impl_from_IXMLDOMText( iface );
584 HRESULT hr;
585 BSTR data;
586 LONG p_len;
588 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
590 /* Nothing to do if NULL or an Empty string passed in. */
591 if((p_len = SysStringLen(p)) == 0) return S_OK;
593 hr = IXMLDOMText_get_data(iface, &data);
594 if(hr == S_OK)
596 LONG len = SysStringLen(data);
597 BSTR str = SysAllocStringLen(NULL, p_len + len);
599 memcpy(str, data, len*sizeof(WCHAR));
600 memcpy(&str[len], p, p_len*sizeof(WCHAR));
601 str[len+p_len] = 0;
603 hr = IXMLDOMText_put_data(iface, str);
605 SysFreeString(str);
606 SysFreeString(data);
609 return hr;
612 static HRESULT WINAPI domtext_insertData(
613 IXMLDOMText *iface,
614 LONG offset, BSTR p)
616 domtext *This = impl_from_IXMLDOMText( iface );
617 HRESULT hr;
618 BSTR data;
619 LONG p_len;
621 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
623 /* If have a NULL or empty string, don't do anything. */
624 if((p_len = SysStringLen(p)) == 0)
625 return S_OK;
627 if(offset < 0)
629 return E_INVALIDARG;
632 hr = IXMLDOMText_get_data(iface, &data);
633 if(hr == S_OK)
635 LONG len = SysStringLen(data);
636 BSTR str;
638 if(len < offset)
640 SysFreeString(data);
641 return E_INVALIDARG;
644 str = SysAllocStringLen(NULL, len + p_len);
645 /* start part, supplied string and end part */
646 memcpy(str, data, offset*sizeof(WCHAR));
647 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
648 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
649 str[len+p_len] = 0;
651 hr = IXMLDOMText_put_data(iface, str);
653 SysFreeString(str);
654 SysFreeString(data);
657 return hr;
660 static HRESULT WINAPI domtext_deleteData(
661 IXMLDOMText *iface,
662 LONG offset, LONG count)
664 HRESULT hr;
665 LONG len = -1;
666 BSTR str;
668 TRACE("(%p)->(%d %d)\n", iface, offset, count);
670 hr = IXMLDOMText_get_length(iface, &len);
671 if(hr != S_OK) return hr;
673 if((offset < 0) || (offset > len) || (count < 0))
674 return E_INVALIDARG;
676 if(len == 0) return S_OK;
678 /* cutting start or end */
679 if((offset == 0) || ((count + offset) >= len))
681 if(offset == 0)
682 IXMLDOMText_substringData(iface, count, len - count, &str);
683 else
684 IXMLDOMText_substringData(iface, 0, offset, &str);
685 hr = IXMLDOMText_put_data(iface, str);
687 else
688 /* cutting from the inside */
690 BSTR str_end;
692 IXMLDOMText_substringData(iface, 0, offset, &str);
693 IXMLDOMText_substringData(iface, offset + count, len - count, &str_end);
695 hr = IXMLDOMText_put_data(iface, str);
696 if(hr == S_OK)
697 hr = IXMLDOMText_appendData(iface, str_end);
699 SysFreeString(str_end);
702 SysFreeString(str);
704 return hr;
707 static HRESULT WINAPI domtext_replaceData(
708 IXMLDOMText *iface,
709 LONG offset, LONG count, BSTR p)
711 domtext *This = impl_from_IXMLDOMText( iface );
712 HRESULT hr;
714 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
716 hr = IXMLDOMText_deleteData(iface, offset, count);
718 if (hr == S_OK)
719 hr = IXMLDOMText_insertData(iface, offset, p);
721 return hr;
724 static HRESULT WINAPI domtext_splitText(
725 IXMLDOMText *iface,
726 LONG offset, IXMLDOMText **txtNode)
728 domtext *This = impl_from_IXMLDOMText( iface );
729 FIXME("(%p)->(%d %p)\n", This, offset, txtNode);
730 return E_NOTIMPL;
734 static const struct IXMLDOMTextVtbl domtext_vtbl =
736 domtext_QueryInterface,
737 domtext_AddRef,
738 domtext_Release,
739 domtext_GetTypeInfoCount,
740 domtext_GetTypeInfo,
741 domtext_GetIDsOfNames,
742 domtext_Invoke,
743 domtext_get_nodeName,
744 domtext_get_nodeValue,
745 domtext_put_nodeValue,
746 domtext_get_nodeType,
747 domtext_get_parentNode,
748 domtext_get_childNodes,
749 domtext_get_firstChild,
750 domtext_get_lastChild,
751 domtext_get_previousSibling,
752 domtext_get_nextSibling,
753 domtext_get_attributes,
754 domtext_insertBefore,
755 domtext_replaceChild,
756 domtext_removeChild,
757 domtext_appendChild,
758 domtext_hasChildNodes,
759 domtext_get_ownerDocument,
760 domtext_cloneNode,
761 domtext_get_nodeTypeString,
762 domtext_get_text,
763 domtext_put_text,
764 domtext_get_specified,
765 domtext_get_definition,
766 domtext_get_nodeTypedValue,
767 domtext_put_nodeTypedValue,
768 domtext_get_dataType,
769 domtext_put_dataType,
770 domtext_get_xml,
771 domtext_transformNode,
772 domtext_selectNodes,
773 domtext_selectSingleNode,
774 domtext_get_parsed,
775 domtext_get_namespaceURI,
776 domtext_get_prefix,
777 domtext_get_baseName,
778 domtext_transformNodeToObject,
779 domtext_get_data,
780 domtext_put_data,
781 domtext_get_length,
782 domtext_substringData,
783 domtext_appendData,
784 domtext_insertData,
785 domtext_deleteData,
786 domtext_replaceData,
787 domtext_splitText
790 IUnknown* create_text( xmlNodePtr text )
792 domtext *This;
794 This = heap_alloc( sizeof *This );
795 if ( !This )
796 return NULL;
798 This->lpVtbl = &domtext_vtbl;
799 This->ref = 1;
801 init_xmlnode(&This->node, text, (IUnknown*)&This->lpVtbl, NULL);
803 return (IUnknown*) &This->lpVtbl;
806 #endif