2 * DOM Document implementation
4 * Copyright 2005 Mike McCormack
6 * iface 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 * iface 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 #include "wine/debug.h"
37 #include "msxml_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(msxml
);
43 typedef struct _domdoc
45 const struct IXMLDOMDocumentVtbl
*lpVtbl
;
51 static inline domdoc
*impl_from_IXMLDOMDocument( IXMLDOMDocument
*iface
)
53 return (domdoc
*)((char*)iface
- FIELD_OFFSET(domdoc
, lpVtbl
));
56 static inline xmlDocPtr
get_doc( domdoc
*This
)
58 return (xmlDocPtr
) xmlNodePtr_from_domnode( This
->node
, XML_DOCUMENT_NODE
);
61 static HRESULT WINAPI
domdoc_QueryInterface( IXMLDOMDocument
*iface
, REFIID riid
, void** ppvObject
)
63 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
65 TRACE("%p %p %p\n", This
, debugstr_guid( riid
), ppvObject
);
67 if ( IsEqualGUID( riid
, &IID_IXMLDOMDocument
) ||
68 IsEqualGUID( riid
, &IID_IXMLDOMNode
) ||
69 IsEqualGUID( riid
, &IID_IDispatch
) ||
70 IsEqualGUID( riid
, &IID_IUnknown
) )
77 IXMLDOMDocument_AddRef( iface
);
83 static ULONG WINAPI
domdoc_AddRef(
84 IXMLDOMDocument
*iface
)
86 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
88 return InterlockedIncrement( &This
->ref
);
92 static ULONG WINAPI
domdoc_Release(
93 IXMLDOMDocument
*iface
)
95 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
100 ref
= InterlockedDecrement( &This
->ref
);
104 IXMLDOMElement_Release( This
->node
);
105 HeapFree( GetProcessHeap(), 0, This
);
111 static HRESULT WINAPI
domdoc_GetTypeInfoCount( IXMLDOMDocument
*iface
, UINT
* pctinfo
)
117 static HRESULT WINAPI
domdoc_GetTypeInfo(
118 IXMLDOMDocument
*iface
,
119 UINT iTInfo
, LCID lcid
, ITypeInfo
** ppTInfo
)
125 static HRESULT WINAPI
domdoc_GetIDsOfNames(
126 IXMLDOMDocument
*iface
,
138 static HRESULT WINAPI
domdoc_Invoke(
139 IXMLDOMDocument
*iface
,
144 DISPPARAMS
* pDispParams
,
146 EXCEPINFO
* pExcepInfo
,
154 static HRESULT WINAPI
domdoc_get_nodeName(
155 IXMLDOMDocument
*iface
,
158 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
159 return IXMLDOMNode_get_nodeName( This
->node
, name
);
163 static HRESULT WINAPI
domdoc_get_nodeValue(
164 IXMLDOMDocument
*iface
,
167 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
168 return IXMLDOMNode_get_nodeValue( This
->node
, value
);
172 static HRESULT WINAPI
domdoc_put_nodeValue(
173 IXMLDOMDocument
*iface
,
176 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
177 return IXMLDOMNode_put_nodeValue( This
->node
, value
);
181 static HRESULT WINAPI
domdoc_get_nodeType(
182 IXMLDOMDocument
*iface
,
185 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
186 return IXMLDOMNode_get_nodeType( This
->node
, type
);
190 static HRESULT WINAPI
domdoc_get_parentNode(
191 IXMLDOMDocument
*iface
,
192 IXMLDOMNode
** parent
)
194 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
195 return IXMLDOMNode_get_parentNode( This
->node
, parent
);
199 static HRESULT WINAPI
domdoc_get_childNodes(
200 IXMLDOMDocument
*iface
,
201 IXMLDOMNodeList
** childList
)
203 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
204 return IXMLDOMNode_get_childNodes( This
->node
, childList
);
208 static HRESULT WINAPI
domdoc_get_firstChild(
209 IXMLDOMDocument
*iface
,
210 IXMLDOMNode
** firstChild
)
212 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
213 return IXMLDOMNode_get_firstChild( This
->node
, firstChild
);
217 static HRESULT WINAPI
domdoc_get_lastChild(
218 IXMLDOMDocument
*iface
,
219 IXMLDOMNode
** lastChild
)
221 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
222 return IXMLDOMNode_get_lastChild( This
->node
, lastChild
);
226 static HRESULT WINAPI
domdoc_get_previousSibling(
227 IXMLDOMDocument
*iface
,
228 IXMLDOMNode
** previousSibling
)
230 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
231 return IXMLDOMNode_get_previousSibling( This
->node
, previousSibling
);
235 static HRESULT WINAPI
domdoc_get_nextSibling(
236 IXMLDOMDocument
*iface
,
237 IXMLDOMNode
** nextSibling
)
239 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
240 return IXMLDOMNode_get_nextSibling( This
->node
, nextSibling
);
244 static HRESULT WINAPI
domdoc_get_attributes(
245 IXMLDOMDocument
*iface
,
246 IXMLDOMNamedNodeMap
** attributeMap
)
248 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
249 return IXMLDOMNode_get_attributes( This
->node
, attributeMap
);
253 static HRESULT WINAPI
domdoc_insertBefore(
254 IXMLDOMDocument
*iface
,
255 IXMLDOMNode
* newChild
,
257 IXMLDOMNode
** outNewChild
)
259 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
260 return IXMLDOMNode_insertBefore( This
->node
, newChild
, refChild
, outNewChild
);
264 static HRESULT WINAPI
domdoc_replaceChild(
265 IXMLDOMDocument
*iface
,
266 IXMLDOMNode
* newChild
,
267 IXMLDOMNode
* oldChild
,
268 IXMLDOMNode
** outOldChild
)
270 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
271 return IXMLDOMNode_replaceChild( This
->node
, newChild
, oldChild
, outOldChild
);
275 static HRESULT WINAPI
domdoc_removeChild(
276 IXMLDOMDocument
*iface
,
277 IXMLDOMNode
* childNode
,
278 IXMLDOMNode
** oldChild
)
280 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
281 return IXMLDOMNode_removeChild( This
->node
, childNode
, oldChild
);
285 static HRESULT WINAPI
domdoc_appendChild(
286 IXMLDOMDocument
*iface
,
287 IXMLDOMNode
* newChild
,
288 IXMLDOMNode
** outNewChild
)
290 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
291 return IXMLDOMNode_appendChild( This
->node
, newChild
, outNewChild
);
295 static HRESULT WINAPI
domdoc_hasChildNodes(
296 IXMLDOMDocument
*iface
,
297 VARIANT_BOOL
* hasChild
)
299 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
300 return IXMLDOMNode_hasChildNodes( This
->node
, hasChild
);
304 static HRESULT WINAPI
domdoc_get_ownerDocument(
305 IXMLDOMDocument
*iface
,
306 IXMLDOMDocument
** DOMDocument
)
308 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
309 return IXMLDOMNode_get_ownerDocument( This
->node
, DOMDocument
);
313 static HRESULT WINAPI
domdoc_cloneNode(
314 IXMLDOMDocument
*iface
,
316 IXMLDOMNode
** cloneRoot
)
318 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
319 return IXMLDOMNode_cloneNode( This
->node
, deep
, cloneRoot
);
323 static HRESULT WINAPI
domdoc_get_nodeTypeString(
324 IXMLDOMDocument
*iface
,
327 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
328 return IXMLDOMNode_get_nodeTypeString( This
->node
, nodeType
);
332 static HRESULT WINAPI
domdoc_get_text(
333 IXMLDOMDocument
*iface
,
336 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
337 return IXMLDOMNode_get_text( This
->node
, text
);
341 static HRESULT WINAPI
domdoc_put_text(
342 IXMLDOMDocument
*iface
,
345 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
346 return IXMLDOMNode_put_text( This
->node
, text
);
350 static HRESULT WINAPI
domdoc_get_specified(
351 IXMLDOMDocument
*iface
,
352 VARIANT_BOOL
* isSpecified
)
354 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
355 return IXMLDOMNode_get_specified( This
->node
, isSpecified
);
359 static HRESULT WINAPI
domdoc_get_definition(
360 IXMLDOMDocument
*iface
,
361 IXMLDOMNode
** definitionNode
)
363 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
364 return IXMLDOMNode_get_definition( This
->node
, definitionNode
);
368 static HRESULT WINAPI
domdoc_get_nodeTypedValue(
369 IXMLDOMDocument
*iface
,
370 VARIANT
* typedValue
)
372 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
373 return IXMLDOMNode_get_nodeTypedValue( This
->node
, typedValue
);
376 static HRESULT WINAPI
domdoc_put_nodeTypedValue(
377 IXMLDOMDocument
*iface
,
380 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
381 return IXMLDOMNode_put_nodeTypedValue( This
->node
, typedValue
);
385 static HRESULT WINAPI
domdoc_get_dataType(
386 IXMLDOMDocument
*iface
,
387 VARIANT
* dataTypeName
)
389 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
390 return IXMLDOMNode_get_dataType( This
->node
, dataTypeName
);
394 static HRESULT WINAPI
domdoc_put_dataType(
395 IXMLDOMDocument
*iface
,
398 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
399 return IXMLDOMNode_put_dataType( This
->node
, dataTypeName
);
403 static HRESULT WINAPI
domdoc_get_xml(
404 IXMLDOMDocument
*iface
,
407 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
408 return IXMLDOMNode_get_xml( This
->node
, xmlString
);
412 static HRESULT WINAPI
domdoc_transformNode(
413 IXMLDOMDocument
*iface
,
414 IXMLDOMNode
* styleSheet
,
417 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
418 return IXMLDOMNode_transformNode( This
->node
, styleSheet
, xmlString
);
422 static HRESULT WINAPI
domdoc_selectNodes(
423 IXMLDOMDocument
*iface
,
425 IXMLDOMNodeList
** resultList
)
427 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
428 return IXMLDOMNode_selectNodes( This
->node
, queryString
, resultList
);
432 static HRESULT WINAPI
domdoc_selectSingleNode(
433 IXMLDOMDocument
*iface
,
435 IXMLDOMNode
** resultNode
)
437 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
438 return IXMLDOMNode_selectSingleNode( This
->node
, queryString
, resultNode
);
442 static HRESULT WINAPI
domdoc_get_parsed(
443 IXMLDOMDocument
*iface
,
444 VARIANT_BOOL
* isParsed
)
446 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
447 return IXMLDOMNode_get_parsed( This
->node
, isParsed
);
451 static HRESULT WINAPI
domdoc_get_namespaceURI(
452 IXMLDOMDocument
*iface
,
455 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
456 return IXMLDOMNode_get_namespaceURI( This
->node
, namespaceURI
);
460 static HRESULT WINAPI
domdoc_get_prefix(
461 IXMLDOMDocument
*iface
,
464 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
465 return IXMLDOMNode_get_prefix( This
->node
, prefixString
);
469 static HRESULT WINAPI
domdoc_get_baseName(
470 IXMLDOMDocument
*iface
,
473 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
474 return IXMLDOMNode_get_baseName( This
->node
, nameString
);
478 static HRESULT WINAPI
domdoc_transformNodeToObject(
479 IXMLDOMDocument
*iface
,
480 IXMLDOMNode
* stylesheet
,
481 VARIANT outputObject
)
483 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
484 return IXMLDOMNode_transformNodeToObject( This
->node
, stylesheet
, outputObject
);
488 static HRESULT WINAPI
domdoc_get_doctype(
489 IXMLDOMDocument
*iface
,
490 IXMLDOMDocument
** documentType
)
497 static HRESULT WINAPI
domdoc_get_implementation(
498 IXMLDOMDocument
*iface
,
499 IXMLDOMImplementation
** impl
)
505 static HRESULT WINAPI
domdoc_get_documentElement(
506 IXMLDOMDocument
*iface
,
507 IXMLDOMElement
** DOMElement
)
509 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
510 xmlDocPtr xmldoc
= NULL
;
511 xmlNodePtr root
= NULL
;
520 xmldoc
= get_doc( This
);
524 root
= xmlDocGetRootElement( xmldoc
);
528 *DOMElement
= create_element( root
);
534 static HRESULT WINAPI
domdoc_documentElement(
535 IXMLDOMDocument
*iface
,
536 IXMLDOMElement
* DOMElement
)
543 static HRESULT WINAPI
domdoc_createElement(
544 IXMLDOMDocument
*iface
,
546 IXMLDOMElement
** element
)
553 static HRESULT WINAPI
domdoc_createDocumentFragment(
554 IXMLDOMDocument
*iface
,
555 IXMLDOMDocumentFragment
** docFrag
)
562 static HRESULT WINAPI
domdoc_createTextNode(
563 IXMLDOMDocument
*iface
,
572 static HRESULT WINAPI
domdoc_createComment(
573 IXMLDOMDocument
*iface
,
575 IXMLDOMComment
** comment
)
582 static HRESULT WINAPI
domdoc_createCDATASection(
583 IXMLDOMDocument
*iface
,
585 IXMLDOMCDATASection
** cdata
)
592 static HRESULT WINAPI
domdoc_createProcessingInstruction(
593 IXMLDOMDocument
*iface
,
596 IXMLDOMProcessingInstruction
** pi
)
603 static HRESULT WINAPI
domdoc_createAttribute(
604 IXMLDOMDocument
*iface
,
606 IXMLDOMAttribute
** attribute
)
613 static HRESULT WINAPI
domdoc_createEntityReference(
614 IXMLDOMDocument
*iface
,
616 IXMLDOMEntityReference
** entityRef
)
623 static HRESULT WINAPI
domdoc_getElementsByTagName(
624 IXMLDOMDocument
*iface
,
626 IXMLDOMNodeList
** resultList
)
633 static HRESULT WINAPI
domdoc_createNode(
634 IXMLDOMDocument
*iface
,
645 static HRESULT WINAPI
domdoc_nodeFromID(
646 IXMLDOMDocument
*iface
,
654 static xmlDocPtr
doparse( char *ptr
, int len
)
656 #ifdef HAVE_XMLREADMEMORY
658 * use xmlReadMemory if possible so we can suppress
659 * writing errors to stderr
661 return xmlReadMemory( ptr
, len
, NULL
, NULL
,
662 XML_PARSE_NOERROR
| XML_PARSE_NOWARNING
);
664 return xmlParseMemory( ptr
, len
);
668 static xmlDocPtr
doread( LPWSTR filename
)
670 HANDLE handle
, mapping
;
672 xmlDocPtr xmldoc
= NULL
;
675 TRACE("%s\n", debugstr_w( filename
));
677 handle
= CreateFileW( filename
, GENERIC_READ
, FILE_SHARE_READ
,
678 NULL
, OPEN_EXISTING
, 0, NULL
);
679 if( handle
== INVALID_HANDLE_VALUE
)
682 len
= GetFileSize( handle
, NULL
);
683 if( len
!= INVALID_FILE_SIZE
|| GetLastError() == NO_ERROR
)
685 mapping
= CreateFileMappingW( handle
, NULL
, PAGE_READONLY
, 0, 0, NULL
);
688 ptr
= MapViewOfFile( mapping
, FILE_MAP_READ
, 0, 0, len
);
691 xmldoc
= doparse( ptr
, len
);
692 UnmapViewOfFile( ptr
);
694 CloseHandle( mapping
);
697 CloseHandle( handle
);
703 static HRESULT WINAPI
domdoc_load(
704 IXMLDOMDocument
*iface
,
706 VARIANT_BOOL
* isSuccessful
)
708 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
709 LPWSTR filename
= NULL
;
712 TRACE("type %d\n", V_VT(&xmlSource
) );
716 IXMLDOMNode_Release( This
->node
);
720 switch( V_VT(&xmlSource
) )
723 filename
= V_BSTR(&xmlSource
);
729 xmldoc
= doread( filename
);
731 *isSuccessful
= VARIANT_FALSE
;
735 This
->node
= create_node( (xmlNodePtr
) xmldoc
);
738 *isSuccessful
= VARIANT_FALSE
;
742 *isSuccessful
= VARIANT_TRUE
;
747 static HRESULT WINAPI
domdoc_get_readyState(
748 IXMLDOMDocument
*iface
,
756 static HRESULT WINAPI
domdoc_get_parseError(
757 IXMLDOMDocument
*iface
,
758 IXMLDOMParseError
** errorObj
)
765 static HRESULT WINAPI
domdoc_get_url(
766 IXMLDOMDocument
*iface
,
774 static HRESULT WINAPI
domdoc_get_async(
775 IXMLDOMDocument
*iface
,
776 VARIANT_BOOL
* isAsync
)
778 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
780 TRACE("%p <- %d\n", isAsync
, This
->async
);
781 *isAsync
= This
->async
;
786 static HRESULT WINAPI
domdoc_put_async(
787 IXMLDOMDocument
*iface
,
788 VARIANT_BOOL isAsync
)
790 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
792 TRACE("%d\n", isAsync
);
793 This
->async
= isAsync
;
798 static HRESULT WINAPI
domdoc_abort(
799 IXMLDOMDocument
*iface
)
806 BOOL
bstr_to_utf8( BSTR bstr
, char **pstr
, int *plen
)
808 UINT len
, blen
= SysStringLen( bstr
);
811 len
= WideCharToMultiByte( CP_UTF8
, 0, bstr
, blen
, NULL
, 0, NULL
, NULL
);
812 str
= HeapAlloc( GetProcessHeap(), 0, len
);
815 WideCharToMultiByte( CP_UTF8
, 0, bstr
, blen
, str
, len
, NULL
, NULL
);
821 static HRESULT WINAPI
domdoc_loadXML(
822 IXMLDOMDocument
*iface
,
824 VARIANT_BOOL
* isSuccessful
)
826 domdoc
*This
= impl_from_IXMLDOMDocument( iface
);
831 TRACE("%p %s %p\n", This
, debugstr_w( bstrXML
), isSuccessful
);
835 IXMLDOMNode_Release( This
->node
);
842 *isSuccessful
= VARIANT_FALSE
;
847 if ( !bstr_to_utf8( bstrXML
, &str
, &len
) )
850 xmldoc
= doparse( str
, len
);
851 HeapFree( GetProcessHeap(), 0, str
);
853 This
->node
= create_node( (xmlNodePtr
) xmldoc
);
857 *isSuccessful
= VARIANT_TRUE
;
862 static HRESULT WINAPI
domdoc_save(
863 IXMLDOMDocument
*iface
,
864 VARIANT destination
)
870 static HRESULT WINAPI
domdoc_get_validateOnParse(
871 IXMLDOMDocument
*iface
,
872 VARIANT_BOOL
* isValidating
)
879 static HRESULT WINAPI
domdoc_put_validateOnParse(
880 IXMLDOMDocument
*iface
,
881 VARIANT_BOOL isValidating
)
888 static HRESULT WINAPI
domdoc_get_resolveExternals(
889 IXMLDOMDocument
*iface
,
890 VARIANT_BOOL
* isResolving
)
897 static HRESULT WINAPI
domdoc_put_resolveExternals(
898 IXMLDOMDocument
*iface
,
899 VARIANT_BOOL isValidating
)
906 static HRESULT WINAPI
domdoc_get_preserveWhiteSpace(
907 IXMLDOMDocument
*iface
,
908 VARIANT_BOOL
* isPreserving
)
915 static HRESULT WINAPI
domdoc_put_preserveWhiteSpace(
916 IXMLDOMDocument
*iface
,
917 VARIANT_BOOL isPreserving
)
924 static HRESULT WINAPI
domdoc_put_onReadyStateChange(
925 IXMLDOMDocument
*iface
,
926 VARIANT readyStateChangeSink
)
933 static HRESULT WINAPI
domdoc_put_onDataAvailable(
934 IXMLDOMDocument
*iface
,
935 VARIANT onDataAvailableSink
)
941 static HRESULT WINAPI
domdoc_put_onTransformNode(
942 IXMLDOMDocument
*iface
,
943 VARIANT onTransformNodeSink
)
949 const struct IXMLDOMDocumentVtbl domdoc_vtbl
=
951 domdoc_QueryInterface
,
954 domdoc_GetTypeInfoCount
,
956 domdoc_GetIDsOfNames
,
959 domdoc_get_nodeValue
,
960 domdoc_put_nodeValue
,
962 domdoc_get_parentNode
,
963 domdoc_get_childNodes
,
964 domdoc_get_firstChild
,
965 domdoc_get_lastChild
,
966 domdoc_get_previousSibling
,
967 domdoc_get_nextSibling
,
968 domdoc_get_attributes
,
973 domdoc_hasChildNodes
,
974 domdoc_get_ownerDocument
,
976 domdoc_get_nodeTypeString
,
979 domdoc_get_specified
,
980 domdoc_get_definition
,
981 domdoc_get_nodeTypedValue
,
982 domdoc_put_nodeTypedValue
,
986 domdoc_transformNode
,
988 domdoc_selectSingleNode
,
990 domdoc_get_namespaceURI
,
993 domdoc_transformNodeToObject
,
995 domdoc_get_implementation
,
996 domdoc_get_documentElement
,
997 domdoc_documentElement
,
998 domdoc_createElement
,
999 domdoc_createDocumentFragment
,
1000 domdoc_createTextNode
,
1001 domdoc_createComment
,
1002 domdoc_createCDATASection
,
1003 domdoc_createProcessingInstruction
,
1004 domdoc_createAttribute
,
1005 domdoc_createEntityReference
,
1006 domdoc_getElementsByTagName
,
1010 domdoc_get_readyState
,
1011 domdoc_get_parseError
,
1018 domdoc_get_validateOnParse
,
1019 domdoc_put_validateOnParse
,
1020 domdoc_get_resolveExternals
,
1021 domdoc_put_resolveExternals
,
1022 domdoc_get_preserveWhiteSpace
,
1023 domdoc_put_preserveWhiteSpace
,
1024 domdoc_put_onReadyStateChange
,
1025 domdoc_put_onDataAvailable
,
1026 domdoc_put_onTransformNode
,
1029 HRESULT
DOMDocument_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
)
1033 doc
= HeapAlloc( GetProcessHeap(), 0, sizeof (*doc
) );
1035 return E_OUTOFMEMORY
;
1037 doc
->lpVtbl
= &domdoc_vtbl
;
1042 *ppObj
= &doc
->lpVtbl
;
1049 HRESULT
DOMDocument_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
)
1051 MESSAGE("This program tried to use a DOMDocument object, but\n"
1052 "libxml2 support was not present at compile time.\n");