Commit 6d09e450 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Do not depend on libxml2 for XMLHTTP object.

parent 01d513da
......@@ -3801,7 +3801,7 @@ HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document)
return S_OK;
}
HRESULT DOMDocument_create(MSXML_VERSION version, void **ppObj)
HRESULT dom_document_create(MSXML_VERSION version, void **ppObj)
{
xmlDocPtr xmldoc;
HRESULT hr;
......@@ -3842,7 +3842,7 @@ IUnknown* create_domdoc( xmlNodePtr document )
#else
HRESULT DOMDocument_create(MSXML_VERSION version, void **ppObj)
HRESULT dom_document_create(MSXML_VERSION version, void **ppObj)
{
MESSAGE("This program tried to use a DOMDocument object, but\n"
"libxml2 support was not present at compile time.\n");
......
......@@ -302,7 +302,7 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
IsEqualCLSID( rclsid, &CLSID_DOMDocument40 )|| /* Version dep. v 4.0 */
IsEqualCLSID( rclsid, &CLSID_DOMDocument60 )) /* Version dep. v 6.0 */
{
return DOMClassFactory_Create(rclsid, riid, ppv, DOMDocument_create);
return DOMClassFactory_Create(rclsid, riid, ppv, dom_document_create);
}
else if( IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache ) ||
IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache26 ) ||
......@@ -323,7 +323,7 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument40 ) ||
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument60 ))
{
return DOMClassFactory_Create(rclsid, riid, ppv, DOMDocument_create);
return DOMClassFactory_Create(rclsid, riid, ppv, dom_document_create);
}
else if( IsEqualCLSID( rclsid, &CLSID_SAXXMLReader) ||
IsEqualCLSID( rclsid, &CLSID_SAXXMLReader30 ) ||
......
......@@ -22,14 +22,7 @@
#define COBJMACROS
#define NONAMELESSUNION
#include "config.h"
#include <stdarg.h>
#ifdef HAVE_LIBXML2
# include <libxml/parser.h>
# include <libxml/xmlerror.h>
# include <libxml/encoding.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -44,11 +37,10 @@
#include "docobj.h"
#include "shlwapi.h"
#include "msxml_private.h"
#include "msxml_dispex.h"
#include "wine/debug.h"
#ifdef HAVE_LIBXML2
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
......@@ -1238,7 +1230,7 @@ static HRESULT httprequest_get_responseXML(httprequest *This, IDispatch **body)
if (!body) return E_INVALIDARG;
if (This->state != READYSTATE_COMPLETE) return E_FAIL;
hr = DOMDocument_create(MSXML_DEFAULT, (void**)&doc);
hr = dom_document_create(MSXML_DEFAULT, (void**)&doc);
if (hr != S_OK) return hr;
hr = httprequest_get_responseText(This, &str);
......@@ -2151,21 +2143,3 @@ HRESULT ServerXMLHTTP_create(void **obj)
return S_OK;
}
#else
HRESULT XMLHTTPRequest_create(void **ppObj)
{
MESSAGE("This program tried to use a XMLHTTPRequest object, but\n"
"libxml2 support was not present at compile time.\n");
return E_NOTIMPL;
}
HRESULT ServerXMLHTTP_create(void **obj)
{
MESSAGE("This program tried to use a ServerXMLHTTP object, but\n"
"libxml2 support was not present at compile time.\n");
return E_NOTIMPL;
}
#endif
......@@ -144,4 +144,7 @@ static inline HRESULT return_bstrn(const WCHAR *value, int len, BSTR *p)
return S_OK;
}
extern HRESULT dom_document_create(MSXML_VERSION class_version, void **document) DECLSPEC_HIDDEN;
IUri *get_base_uri(IUnknown *site) DECLSPEC_HIDDEN;
#endif /* __MSXML_DISPEX__ */
......@@ -385,7 +385,6 @@ static inline HRESULT return_var_false(VARIANT_BOOL *p)
extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
LONG line, LONG linepos, LONG filepos ) DECLSPEC_HIDDEN;
extern HRESULT DOMDocument_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
extern HRESULT SchemaCache_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
extern HRESULT XMLDocument_create(void**) DECLSPEC_HIDDEN;
extern HRESULT SAXXMLReader_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN;
......@@ -404,7 +403,6 @@ HRESULT create_moniker_from_url(LPCWSTR, IMoniker**) DECLSPEC_HIDDEN;
HRESULT create_uri(IUri *base, const WCHAR *, IUri **) DECLSPEC_HIDDEN;
HRESULT bind_url(IMoniker*, HRESULT (*onDataAvailable)(void*,char*,DWORD), void*, bsc_t**) DECLSPEC_HIDDEN;
HRESULT detach_bsc(bsc_t*) DECLSPEC_HIDDEN;
IUri *get_base_uri(IUnknown *) DECLSPEC_HIDDEN;
/* Error Codes - not defined anywhere in the public headers */
#define E_XML_ELEMENT_UNDECLARED 0xC00CE00D
......
......@@ -942,7 +942,7 @@ static cache_entry* cache_entry_from_url(VARIANT url, xmlChar const* nsURI, MSXM
cache_entry* entry;
IXMLDOMDocument3* domdoc = NULL;
xmlDocPtr doc = NULL;
HRESULT hr = DOMDocument_create(version, (void**)&domdoc);
HRESULT hr = dom_document_create(version, (void **)&domdoc);
VARIANT_BOOL b = VARIANT_FALSE;
CacheEntryType type = CacheEntryType_Invalid;
......@@ -1266,7 +1266,7 @@ static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2* iface, BSTR uri
BSTR xml;
IXMLDOMNode_get_xml(domnode, &xml);
DOMDocument_create(This->version, (void**)&domdoc);
dom_document_create(This->version, (void **)&domdoc);
IXMLDOMDocument_loadXML(domdoc, xml, &b);
SysFreeString(xml);
doc = xmlNodePtr_from_domnode((IXMLDOMNode*)domdoc, XML_DOCUMENT_NODE)->doc;
......
......@@ -404,7 +404,7 @@ static HRESULT WINAPI xslprocessor_put_input( IXSLProcessor *iface, VARIANT inpu
{
IXMLDOMDocument *doc;
hr = DOMDocument_create(MSXML_DEFAULT, (void**)&doc);
hr = dom_document_create(MSXML_DEFAULT, (void **)&doc);
if (hr == S_OK)
{
VARIANT_BOOL b;
......
......@@ -399,7 +399,7 @@ static inline HRESULT handle_xml_load(BindStatusCallback *This)
if(FAILED(hres))
return display_error_page(This);
hres = DOMDocument_create(MSXML_DEFAULT, (void**)&xml);
hres = dom_document_create(MSXML_DEFAULT, (void **)&xml);
if(FAILED(hres))
return display_error_page(This);
......@@ -475,7 +475,7 @@ static inline HRESULT handle_xml_load(BindStatusCallback *This)
return display_error_page(This);
}
hres = DOMDocument_create(MSXML_DEFAULT, (void**)&xsl);
hres = dom_document_create(MSXML_DEFAULT, (void **)&xsl);
if(FAILED(hres)) {
VariantClear(&var);
IXMLDOMDocument3_Release(xml);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment