wiaservc: Add the class factory and IWiaDevMgr stubs.
[wine/hramrach.git] / dlls / msxml3 / text.c
blob6380a0e50ce69c4fe3d36e146615956bab518749
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 HeapFree( GetProcessHeap(), 0, 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 = E_FAIL;
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 HRESULT hr = E_FAIL;
506 VARIANT val;
508 TRACE("%p %s\n", This, debugstr_w(data) );
510 V_VT(&val) = VT_BSTR;
511 V_BSTR(&val) = data;
513 hr = IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), val );
515 return hr;
518 static HRESULT WINAPI domtext_get_length(
519 IXMLDOMText *iface,
520 LONG *len)
522 domtext *This = impl_from_IXMLDOMText( iface );
523 xmlChar *pContent;
524 LONG nLength = 0;
526 TRACE("%p\n", iface);
528 if(!len)
529 return E_INVALIDARG;
531 pContent = xmlNodeGetContent(This->node.node);
532 if(pContent)
534 nLength = xmlStrlen(pContent);
535 xmlFree(pContent);
538 *len = nLength;
540 return S_OK;
543 static HRESULT WINAPI domtext_substringData(
544 IXMLDOMText *iface,
545 LONG offset, LONG count, BSTR *p)
547 domtext *This = impl_from_IXMLDOMText( iface );
548 xmlChar *pContent;
549 LONG nLength = 0;
550 HRESULT hr = S_FALSE;
552 TRACE("%p\n", iface);
554 if(!p)
555 return E_INVALIDARG;
557 *p = NULL;
558 if(offset < 0 || count < 0)
559 return E_INVALIDARG;
561 if(count == 0)
562 return hr;
564 pContent = xmlNodeGetContent(This->node.node);
565 if(pContent)
567 nLength = xmlStrlen(pContent);
569 if( offset < nLength)
571 BSTR sContent = bstr_from_xmlChar(pContent);
572 if(offset + count > nLength)
573 *p = SysAllocString(&sContent[offset]);
574 else
575 *p = SysAllocStringLen(&sContent[offset], count);
577 SysFreeString(sContent);
578 hr = S_OK;
581 xmlFree(pContent);
584 return hr;
587 static HRESULT WINAPI domtext_appendData(
588 IXMLDOMText *iface,
589 BSTR p)
591 domtext *This = impl_from_IXMLDOMText( iface );
592 xmlChar *pContent;
593 HRESULT hr = S_FALSE;
595 TRACE("%p\n", iface);
597 /* Nothing to do if NULL or an Empty string passed in. */
598 if(p == NULL || SysStringLen(p) == 0)
599 return S_OK;
601 pContent = xmlChar_from_wchar( p );
602 if(pContent)
604 if(xmlTextConcat(This->node.node, pContent, SysStringLen(p)) == 0)
605 hr = S_OK;
606 else
607 hr = E_FAIL;
608 HeapFree( GetProcessHeap(), 0, pContent );
610 else
611 hr = E_FAIL;
613 return hr;
616 static HRESULT WINAPI domtext_insertData(
617 IXMLDOMText *iface,
618 LONG offset, BSTR p)
620 domtext *This = impl_from_IXMLDOMText( iface );
621 xmlChar *pXmlContent;
622 BSTR sNewString;
623 HRESULT hr = S_FALSE;
624 LONG nLength = 0, nLengthP = 0;
625 xmlChar *str = NULL;
627 TRACE("%p\n", This);
629 /* If have a NULL or empty string, don't do anything. */
630 if(SysStringLen(p) == 0)
631 return S_OK;
633 if(offset < 0)
635 return E_INVALIDARG;
638 pXmlContent = xmlNodeGetContent(This->node.node);
639 if(pXmlContent)
641 BSTR sContent = bstr_from_xmlChar( pXmlContent );
642 nLength = SysStringLen(sContent);
643 nLengthP = SysStringLen(p);
645 if(nLength < offset)
647 SysFreeString(sContent);
648 xmlFree(pXmlContent);
650 return E_INVALIDARG;
653 sNewString = SysAllocStringLen(NULL, nLength + nLengthP + 1);
654 if(sNewString)
656 if(offset > 0)
657 memcpy(sNewString, sContent, offset * sizeof(WCHAR));
659 memcpy(&sNewString[offset], p, nLengthP * sizeof(WCHAR));
661 if(offset+nLengthP < nLength)
662 memcpy(&sNewString[offset+nLengthP], &sContent[offset], (nLength-offset) * sizeof(WCHAR));
664 sNewString[nLengthP + nLength] = 0;
666 str = xmlChar_from_wchar(sNewString);
667 if(str)
669 xmlNodeSetContent(This->node.node, str);
670 hr = S_OK;
672 HeapFree(GetProcessHeap(), 0, str);
674 SysFreeString(sNewString);
677 SysFreeString(sContent);
679 xmlFree(pXmlContent);
682 return hr;
685 static HRESULT WINAPI domtext_deleteData(
686 IXMLDOMText *iface,
687 LONG offset, LONG count)
689 FIXME("\n");
690 return E_NOTIMPL;
693 static HRESULT WINAPI domtext_replaceData(
694 IXMLDOMText *iface,
695 LONG offset, LONG count, BSTR p)
697 FIXME("\n");
698 return E_NOTIMPL;
701 static HRESULT WINAPI domtext_splitText(
702 IXMLDOMText *iface,
703 LONG offset, IXMLDOMText **txtNode)
705 FIXME("\n");
706 return E_NOTIMPL;
710 static const struct IXMLDOMTextVtbl domtext_vtbl =
712 domtext_QueryInterface,
713 domtext_AddRef,
714 domtext_Release,
715 domtext_GetTypeInfoCount,
716 domtext_GetTypeInfo,
717 domtext_GetIDsOfNames,
718 domtext_Invoke,
719 domtext_get_nodeName,
720 domtext_get_nodeValue,
721 domtext_put_nodeValue,
722 domtext_get_nodeType,
723 domtext_get_parentNode,
724 domtext_get_childNodes,
725 domtext_get_firstChild,
726 domtext_get_lastChild,
727 domtext_get_previousSibling,
728 domtext_get_nextSibling,
729 domtext_get_attributes,
730 domtext_insertBefore,
731 domtext_replaceChild,
732 domtext_removeChild,
733 domtext_appendChild,
734 domtext_hasChildNodes,
735 domtext_get_ownerDocument,
736 domtext_cloneNode,
737 domtext_get_nodeTypeString,
738 domtext_get_text,
739 domtext_put_text,
740 domtext_get_specified,
741 domtext_get_definition,
742 domtext_get_nodeTypedValue,
743 domtext_put_nodeTypedValue,
744 domtext_get_dataType,
745 domtext_put_dataType,
746 domtext_get_xml,
747 domtext_transformNode,
748 domtext_selectNodes,
749 domtext_selectSingleNode,
750 domtext_get_parsed,
751 domtext_get_namespaceURI,
752 domtext_get_prefix,
753 domtext_get_baseName,
754 domtext_transformNodeToObject,
755 domtext_get_data,
756 domtext_put_data,
757 domtext_get_length,
758 domtext_substringData,
759 domtext_appendData,
760 domtext_insertData,
761 domtext_deleteData,
762 domtext_replaceData,
763 domtext_splitText
766 IUnknown* create_text( xmlNodePtr text )
768 domtext *This;
770 This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
771 if ( !This )
772 return NULL;
774 This->lpVtbl = &domtext_vtbl;
775 This->ref = 1;
777 init_xmlnode(&This->node, text, (IUnknown*)&This->lpVtbl, NULL);
779 return (IUnknown*) &This->lpVtbl;
782 #endif