ReactOS 0.4.16-dev-2208-g6350669
saxreader.c File Reference
#include <stdarg.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include <libxml/SAX2.h>
#include <libxml/parserInternals.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
#include "msxml6.h"
#include "wininet.h"
#include "urlmon.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "msxml_private.h"
Include dependency graph for saxreader.c:

Go to the source code of this file.

Classes

struct  saxreader_feature_pair
 
struct  bstrpool
 
struct  ns
 
struct  element_entry
 
struct  saxanyhandler_iface
 
struct  saxcontenthandler_iface
 
struct  saxerrorhandler_iface
 
struct  saxlexicalhandler_iface
 
struct  saxentityresolver_iface
 
struct  saxhandler_iface
 
struct  saxreader
 
struct  saxlocator
 
struct  saxlocator::_attributes
 

Macros

#define COBJMACROS
 

Enumerations

enum  saxreader_feature {
  FeatureUnknown = 0 , ExhaustiveErrors = 1 << 1 , ExternalGeneralEntities = 1 << 2 , ExternalParameterEntities = 1 << 3 ,
  ForcedResync = 1 << 4 , NamespacePrefixes = 1 << 5 , Namespaces = 1 << 6 , ParameterEntities = 1 << 7 ,
  PreserveSystemIndentifiers = 1 << 8 , ProhibitDTD = 1 << 9 , SchemaValidation = 1 << 10 , ServerHttpRequest = 1 << 11 ,
  SuppressValidationfatalError = 1 << 12 , UseInlineSchema = 1 << 13 , UseSchemaLocation = 1 << 14 , LexicalHandlerParEntities = 1 << 15
}
 
enum  saxhandler_type {
  SAXContentHandler = 0 , SAXDeclHandler , SAXDTDHandler , SAXEntityResolver ,
  SAXErrorHandler , SAXLexicalHandler , SAXHandler_Last
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static saxreader_feature get_saxreader_feature (const WCHAR *name)
 
static HRESULT saxreader_put_handler (saxreader *reader, enum saxhandler_type type, void *ptr, BOOL vb)
 
static HRESULT saxreader_get_handler (const saxreader *reader, enum saxhandler_type type, BOOL vb, void **ret)
 
static struct saxcontenthandler_ifacesaxreader_get_contenthandler (saxreader *reader)
 
static struct saxerrorhandler_ifacesaxreader_get_errorhandler (saxreader *reader)
 
static struct saxlexicalhandler_ifacesaxreader_get_lexicalhandler (saxreader *reader)
 
static saxreaderimpl_from_IVBSAXXMLReader (IVBSAXXMLReader *iface)
 
static saxreaderimpl_from_ISAXXMLReader (ISAXXMLReader *iface)
 
static saxlocatorimpl_from_IVBSAXLocator (IVBSAXLocator *iface)
 
static saxlocatorimpl_from_ISAXLocator (ISAXLocator *iface)
 
static saxlocatorimpl_from_IVBSAXAttributes (IVBSAXAttributes *iface)
 
static saxlocatorimpl_from_ISAXAttributes (ISAXAttributes *iface)
 
static BOOL saxreader_has_handler (const saxlocator *locator, enum saxhandler_type type)
 
static HRESULT saxreader_saxcharacters (saxlocator *locator, BSTR chars)
 
static HRESULT set_feature_value (saxreader *reader, saxreader_feature feature, VARIANT_BOOL value)
 
static HRESULT get_feature_value (const saxreader *reader, saxreader_feature feature, VARIANT_BOOL *value)
 
static BOOL is_namespaces_enabled (const saxreader *reader)
 
static BSTR build_qname (BSTR prefix, BSTR local)
 
static element_entryalloc_element_entry (const xmlChar *local, const xmlChar *prefix, int nb_ns, const xmlChar **namespaces)
 
static void free_element_entry (element_entry *element)
 
static void push_element_ns (saxlocator *locator, element_entry *element)
 
static element_entrypop_element_ns (saxlocator *locator)
 
static BSTR find_element_uri (saxlocator *locator, const xmlChar *uri)
 
static BOOL sax_callback_failed (saxlocator *This, HRESULT hr)
 
static BOOL iterate_endprefix_index (saxlocator *This, const element_entry *element, int *i)
 
static BOOL bstr_pool_insert (struct bstrpool *pool, BSTR pool_entry)
 
static void free_bstr_pool (struct bstrpool *pool)
 
static BSTR bstr_from_xmlCharN (const xmlChar *buf, int len)
 
static BSTR QName_from_xmlChar (const xmlChar *prefix, const xmlChar *name)
 
static BSTR pooled_bstr_from_xmlChar (struct bstrpool *pool, const xmlChar *buf)
 
static BSTR pooled_bstr_from_xmlCharN (struct bstrpool *pool, const xmlChar *buf, int len)
 
static void format_error_message_from_id (saxlocator *This, HRESULT hr)
 
static void update_position (saxlocator *This, BOOL fix_column)
 
static HRESULT WINAPI ivbsaxattributes_QueryInterface (IVBSAXAttributes *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI ivbsaxattributes_AddRef (IVBSAXAttributes *iface)
 
static ULONG WINAPI ivbsaxattributes_Release (IVBSAXAttributes *iface)
 
static HRESULT WINAPI ivbsaxattributes_GetTypeInfoCount (IVBSAXAttributes *iface, UINT *pctinfo)
 
static HRESULT WINAPI ivbsaxattributes_GetTypeInfo (IVBSAXAttributes *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ivbsaxattributes_GetIDsOfNames (IVBSAXAttributes *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ivbsaxattributes_Invoke (IVBSAXAttributes *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ivbsaxattributes_get_length (IVBSAXAttributes *iface, int *nLength)
 
static HRESULT WINAPI ivbsaxattributes_getURI (IVBSAXAttributes *iface, int nIndex, BSTR *uri)
 
static HRESULT WINAPI ivbsaxattributes_getLocalName (IVBSAXAttributes *iface, int nIndex, BSTR *name)
 
static HRESULT WINAPI ivbsaxattributes_getQName (IVBSAXAttributes *iface, int nIndex, BSTR *QName)
 
static HRESULT WINAPI ivbsaxattributes_getIndexFromName (IVBSAXAttributes *iface, BSTR uri, BSTR localName, int *index)
 
static HRESULT WINAPI ivbsaxattributes_getIndexFromQName (IVBSAXAttributes *iface, BSTR QName, int *index)
 
static HRESULT WINAPI ivbsaxattributes_getType (IVBSAXAttributes *iface, int nIndex, BSTR *type)
 
static HRESULT WINAPI ivbsaxattributes_getTypeFromName (IVBSAXAttributes *iface, BSTR uri, BSTR localName, BSTR *type)
 
static HRESULT WINAPI ivbsaxattributes_getTypeFromQName (IVBSAXAttributes *iface, BSTR QName, BSTR *type)
 
static HRESULT WINAPI ivbsaxattributes_getValue (IVBSAXAttributes *iface, int nIndex, BSTR *value)
 
static HRESULT WINAPI ivbsaxattributes_getValueFromName (IVBSAXAttributes *iface, BSTR uri, BSTR localName, BSTR *value)
 
static HRESULT WINAPI ivbsaxattributes_getValueFromQName (IVBSAXAttributes *iface, BSTR QName, BSTR *value)
 
static HRESULT WINAPI isaxattributes_QueryInterface (ISAXAttributes *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI isaxattributes_AddRef (ISAXAttributes *iface)
 
static ULONG WINAPI isaxattributes_Release (ISAXAttributes *iface)
 
static HRESULT WINAPI isaxattributes_getLength (ISAXAttributes *iface, int *length)
 
static BOOL is_valid_attr_index (const saxlocator *locator, int index)
 
static HRESULT WINAPI isaxattributes_getURI (ISAXAttributes *iface, int index, const WCHAR **url, int *size)
 
static HRESULT WINAPI isaxattributes_getLocalName (ISAXAttributes *iface, int index, const WCHAR **pLocalName, int *pLocalNameLength)
 
static HRESULT WINAPI isaxattributes_getQName (ISAXAttributes *iface, int index, const WCHAR **pQName, int *pQNameLength)
 
static HRESULT WINAPI isaxattributes_getName (ISAXAttributes *iface, int index, const WCHAR **uri, int *pUriLength, const WCHAR **localName, int *pLocalNameSize, const WCHAR **QName, int *pQNameLength)
 
static HRESULT WINAPI isaxattributes_getIndexFromName (ISAXAttributes *iface, const WCHAR *pUri, int cUriLength, const WCHAR *pLocalName, int cocalNameLength, int *index)
 
static HRESULT WINAPI isaxattributes_getIndexFromQName (ISAXAttributes *iface, const WCHAR *pQName, int nQNameLength, int *index)
 
static HRESULT WINAPI isaxattributes_getType (ISAXAttributes *iface, int nIndex, const WCHAR **pType, int *pTypeLength)
 
static HRESULT WINAPI isaxattributes_getTypeFromName (ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pType, int *nType)
 
static HRESULT WINAPI isaxattributes_getTypeFromQName (ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pType, int *nType)
 
static HRESULT WINAPI isaxattributes_getValue (ISAXAttributes *iface, int index, const WCHAR **value, int *nValue)
 
static HRESULT WINAPI isaxattributes_getValueFromName (ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pValue, int *nValue)
 
static HRESULT WINAPI isaxattributes_getValueFromQName (ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pValue, int *nValue)
 
static BSTR saxreader_get_unescaped_value (const xmlChar *buf, int len)
 
static void free_attribute_values (saxlocator *locator)
 
static HRESULT SAXAttributes_populate (saxlocator *locator, int nb_namespaces, const xmlChar **xmlNamespaces, int nb_attributes, const xmlChar **xmlAttributes)
 
static void libxmlStartDocument (void *ctx)
 
static void libxmlEndDocument (void *ctx)
 
static void libxmlStartElementNS (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes)
 
static void libxmlEndElementNS (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI)
 
static void libxmlCharacters (void *ctx, const xmlChar *ch, int len)
 
static void libxmlSetDocumentLocator (void *ctx, xmlSAXLocatorPtr loc)
 
static void libxmlComment (void *ctx, const xmlChar *value)
 
static void WINAPIV libxmlFatalError (void *ctx, const char *msg,...)
 
static BSTR saxreader_get_cdata_chunk (const xmlChar *str, int len)
 
static void libxml_cdatablock (void *ctx, const xmlChar *value, int len)
 
static xmlParserInputPtr libxmlresolveentity (void *ctx, const xmlChar *publicid, const xmlChar *systemid)
 
static HRESULT WINAPI ivbsaxlocator_QueryInterface (IVBSAXLocator *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI ivbsaxlocator_AddRef (IVBSAXLocator *iface)
 
static ULONG WINAPI ivbsaxlocator_Release (IVBSAXLocator *iface)
 
static HRESULT WINAPI ivbsaxlocator_GetTypeInfoCount (IVBSAXLocator *iface, UINT *pctinfo)
 
static HRESULT WINAPI ivbsaxlocator_GetTypeInfo (IVBSAXLocator *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ivbsaxlocator_GetIDsOfNames (IVBSAXLocator *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ivbsaxlocator_Invoke (IVBSAXLocator *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ivbsaxlocator_get_columnNumber (IVBSAXLocator *iface, int *pnColumn)
 
static HRESULT WINAPI ivbsaxlocator_get_lineNumber (IVBSAXLocator *iface, int *pnLine)
 
static HRESULT WINAPI ivbsaxlocator_get_publicId (IVBSAXLocator *iface, BSTR *ret)
 
static HRESULT WINAPI ivbsaxlocator_get_systemId (IVBSAXLocator *iface, BSTR *ret)
 
static HRESULT WINAPI isaxlocator_QueryInterface (ISAXLocator *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI isaxlocator_AddRef (ISAXLocator *iface)
 
static ULONG WINAPI isaxlocator_Release (ISAXLocator *iface)
 
static HRESULT WINAPI isaxlocator_getColumnNumber (ISAXLocator *iface, int *pnColumn)
 
static HRESULT WINAPI isaxlocator_getLineNumber (ISAXLocator *iface, int *pnLine)
 
static HRESULT WINAPI isaxlocator_getPublicId (ISAXLocator *iface, const WCHAR **ppwchPublicId)
 
static HRESULT WINAPI isaxlocator_getSystemId (ISAXLocator *iface, const WCHAR **ppwchSystemId)
 
static HRESULT SAXLocator_create (saxreader *reader, saxlocator **ppsaxlocator, BOOL vbInterface)
 
static HRESULT internal_parseBuffer (saxreader *This, const char *buffer, int size, BOOL vbInterface)
 
static HRESULT internal_parseStream (saxreader *This, ISequentialStream *stream, BOOL vbInterface)
 
static HRESULT internal_parse (saxreader *This, VARIANT varInput, BOOL vbInterface)
 
static HRESULT internal_vbonDataAvailable (void *obj, char *ptr, DWORD len)
 
static HRESULT internal_onDataAvailable (void *obj, char *ptr, DWORD len)
 
static HRESULT internal_parseURL (saxreader *reader, const WCHAR *url, BOOL vbInterface)
 
static HRESULT saxreader_put_handler_from_variant (saxreader *This, enum saxhandler_type type, const VARIANT *v, BOOL vb)
 
static HRESULT internal_putProperty (saxreader *This, const WCHAR *prop, VARIANT value, BOOL vbInterface)
 
static HRESULT internal_getProperty (const saxreader *This, const WCHAR *prop, VARIANT *value, BOOL vb)
 
static HRESULT WINAPI saxxmlreader_QueryInterface (IVBSAXXMLReader *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI saxxmlreader_AddRef (IVBSAXXMLReader *iface)
 
static ULONG WINAPI saxxmlreader_Release (IVBSAXXMLReader *iface)
 
static HRESULT WINAPI saxxmlreader_GetTypeInfoCount (IVBSAXXMLReader *iface, UINT *pctinfo)
 
static HRESULT WINAPI saxxmlreader_GetTypeInfo (IVBSAXXMLReader *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI saxxmlreader_GetIDsOfNames (IVBSAXXMLReader *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI saxxmlreader_Invoke (IVBSAXXMLReader *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI saxxmlreader_getFeature (IVBSAXXMLReader *iface, BSTR feature_name, VARIANT_BOOL *value)
 
static HRESULT WINAPI saxxmlreader_putFeature (IVBSAXXMLReader *iface, BSTR feature_name, VARIANT_BOOL value)
 
static HRESULT WINAPI saxxmlreader_getProperty (IVBSAXXMLReader *iface, BSTR prop, VARIANT *value)
 
static HRESULT WINAPI saxxmlreader_putProperty (IVBSAXXMLReader *iface, BSTR pProp, VARIANT value)
 
static HRESULT WINAPI saxxmlreader_get_entityResolver (IVBSAXXMLReader *iface, IVBSAXEntityResolver **resolver)
 
static HRESULT WINAPI saxxmlreader_put_entityResolver (IVBSAXXMLReader *iface, IVBSAXEntityResolver *resolver)
 
static HRESULT WINAPI saxxmlreader_get_contentHandler (IVBSAXXMLReader *iface, IVBSAXContentHandler **handler)
 
static HRESULT WINAPI saxxmlreader_put_contentHandler (IVBSAXXMLReader *iface, IVBSAXContentHandler *handler)
 
static HRESULT WINAPI saxxmlreader_get_dtdHandler (IVBSAXXMLReader *iface, IVBSAXDTDHandler **handler)
 
static HRESULT WINAPI saxxmlreader_put_dtdHandler (IVBSAXXMLReader *iface, IVBSAXDTDHandler *handler)
 
static HRESULT WINAPI saxxmlreader_get_errorHandler (IVBSAXXMLReader *iface, IVBSAXErrorHandler **handler)
 
static HRESULT WINAPI saxxmlreader_put_errorHandler (IVBSAXXMLReader *iface, IVBSAXErrorHandler *handler)
 
static HRESULT WINAPI saxxmlreader_get_baseURL (IVBSAXXMLReader *iface, BSTR *pBaseUrl)
 
static HRESULT WINAPI saxxmlreader_put_baseURL (IVBSAXXMLReader *iface, BSTR pBaseUrl)
 
static HRESULT WINAPI saxxmlreader_get_secureBaseURL (IVBSAXXMLReader *iface, BSTR *pSecureBaseUrl)
 
static HRESULT WINAPI saxxmlreader_put_secureBaseURL (IVBSAXXMLReader *iface, BSTR secureBaseUrl)
 
static HRESULT WINAPI saxxmlreader_parse (IVBSAXXMLReader *iface, VARIANT varInput)
 
static HRESULT WINAPI saxxmlreader_parseURL (IVBSAXXMLReader *iface, BSTR url)
 
static HRESULT WINAPI isaxxmlreader_QueryInterface (ISAXXMLReader *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI isaxxmlreader_AddRef (ISAXXMLReader *iface)
 
static ULONG WINAPI isaxxmlreader_Release (ISAXXMLReader *iface)
 
static HRESULT WINAPI isaxxmlreader_getFeature (ISAXXMLReader *iface, const WCHAR *feature_name, VARIANT_BOOL *value)
 
static HRESULT WINAPI isaxxmlreader_putFeature (ISAXXMLReader *iface, const WCHAR *feature_name, VARIANT_BOOL value)
 
static HRESULT WINAPI isaxxmlreader_getProperty (ISAXXMLReader *iface, const WCHAR *prop, VARIANT *value)
 
static HRESULT WINAPI isaxxmlreader_putProperty (ISAXXMLReader *iface, const WCHAR *pProp, VARIANT value)
 
static HRESULT WINAPI isaxxmlreader_getEntityResolver (ISAXXMLReader *iface, ISAXEntityResolver **resolver)
 
static HRESULT WINAPI isaxxmlreader_putEntityResolver (ISAXXMLReader *iface, ISAXEntityResolver *resolver)
 
static HRESULT WINAPI isaxxmlreader_getContentHandler (ISAXXMLReader *iface, ISAXContentHandler **handler)
 
static HRESULT WINAPI isaxxmlreader_putContentHandler (ISAXXMLReader *iface, ISAXContentHandler *handler)
 
static HRESULT WINAPI isaxxmlreader_getDTDHandler (ISAXXMLReader *iface, ISAXDTDHandler **handler)
 
static HRESULT WINAPI isaxxmlreader_putDTDHandler (ISAXXMLReader *iface, ISAXDTDHandler *handler)
 
static HRESULT WINAPI isaxxmlreader_getErrorHandler (ISAXXMLReader *iface, ISAXErrorHandler **handler)
 
static HRESULT WINAPI isaxxmlreader_putErrorHandler (ISAXXMLReader *iface, ISAXErrorHandler *handler)
 
static HRESULT WINAPI isaxxmlreader_getBaseURL (ISAXXMLReader *iface, const WCHAR **base_url)
 
static HRESULT WINAPI isaxxmlreader_putBaseURL (ISAXXMLReader *iface, const WCHAR *pBaseUrl)
 
static HRESULT WINAPI isaxxmlreader_getSecureBaseURL (ISAXXMLReader *iface, const WCHAR **pSecureBaseUrl)
 
static HRESULT WINAPI isaxxmlreader_putSecureBaseURL (ISAXXMLReader *iface, const WCHAR *secureBaseUrl)
 
static HRESULT WINAPI isaxxmlreader_parse (ISAXXMLReader *iface, VARIANT varInput)
 
static HRESULT WINAPI isaxxmlreader_parseURL (ISAXXMLReader *iface, const WCHAR *url)
 
HRESULT SAXXMLReader_create (MSXML_VERSION version, LPVOID *ppObj)
 

Variables

static const WCHAR FeatureExternalGeneralEntitiesW []
 
static const WCHAR FeatureExternalParameterEntitiesW []
 
static const WCHAR FeatureLexicalHandlerParEntitiesW []
 
static const WCHAR FeatureProhibitDTDW []
 
static const WCHAR FeatureNamespacesW []
 
static const WCHAR FeatureNamespacePrefixesW []
 
static const WCHAR ExhaustiveErrorsW []
 
static const WCHAR SchemaValidationW []
 
static const struct saxreader_feature_pair saxreader_feature_map []
 
static const WCHAR empty_str
 
static const WCHAR PropertyCharsetW []
 
static const WCHAR PropertyXmlDeclVersionW []
 
static const WCHAR PropertyDeclHandlerW []
 
static const WCHAR PropertyDomNodeW []
 
static const WCHAR PropertyInputSourceW []
 
static const WCHAR PropertyLexicalHandlerW []
 
static const WCHAR PropertyMaxElementDepthW []
 
static const WCHAR PropertyMaxXMLSizeW []
 
static const WCHAR PropertySchemaDeclHandlerW []
 
static const WCHAR PropertyXMLDeclEncodingW []
 
static const WCHAR PropertyXMLDeclStandaloneW []
 
static const WCHAR PropertyXMLDeclVersionW []
 
static const struct IVBSAXAttributesVtbl ivbsaxattributes_vtbl
 
static const struct ISAXAttributesVtbl isaxattributes_vtbl
 
static const struct IVBSAXLocatorVtbl VBSAXLocatorVtbl
 
static const struct ISAXLocatorVtbl SAXLocatorVtbl
 
static const struct IVBSAXXMLReaderVtbl VBSAXXMLReaderVtbl
 
static const struct ISAXXMLReaderVtbl SAXXMLReaderVtbl
 
static const tid_t saxreader_iface_tids []
 
static dispex_static_data_t saxreader_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file saxreader.c.

Enumeration Type Documentation

◆ saxhandler_type

Enumerator
SAXContentHandler 
SAXDeclHandler 
SAXDTDHandler 
SAXEntityResolver 
SAXErrorHandler 
SAXLexicalHandler 
SAXHandler_Last 

Definition at line 171 of file saxreader.c.

172{
180};
@ SAXDTDHandler
Definition: saxreader.c:175
@ SAXHandler_Last
Definition: saxreader.c:179
@ SAXLexicalHandler
Definition: saxreader.c:178
@ SAXEntityResolver
Definition: saxreader.c:176
@ SAXErrorHandler
Definition: saxreader.c:177
@ SAXDeclHandler
Definition: saxreader.c:174
@ SAXContentHandler
Definition: saxreader.c:173

◆ saxreader_feature

Enumerator
FeatureUnknown 
ExhaustiveErrors 
ExternalGeneralEntities 
ExternalParameterEntities 
ForcedResync 
NamespacePrefixes 
Namespaces 
ParameterEntities 
PreserveSystemIndentifiers 
ProhibitDTD 
SchemaValidation 
ServerHttpRequest 
SuppressValidationfatalError 
UseInlineSchema 
UseSchemaLocation 
LexicalHandlerParEntities 

Definition at line 46 of file saxreader.c.

47{
49 ExhaustiveErrors = 1 << 1,
52 ForcedResync = 1 << 4,
53 NamespacePrefixes = 1 << 5,
54 Namespaces = 1 << 6,
55 ParameterEntities = 1 << 7,
57 ProhibitDTD = 1 << 9,
58 SchemaValidation = 1 << 10,
59 ServerHttpRequest = 1 << 11,
61 UseInlineSchema = 1 << 13,
62 UseSchemaLocation = 1 << 14,
saxreader_feature
Definition: saxreader.c:47
@ ForcedResync
Definition: saxreader.c:52
@ NamespacePrefixes
Definition: saxreader.c:53
@ ExhaustiveErrors
Definition: saxreader.c:49
@ ExternalParameterEntities
Definition: saxreader.c:51
@ UseInlineSchema
Definition: saxreader.c:61
@ Namespaces
Definition: saxreader.c:54
@ PreserveSystemIndentifiers
Definition: saxreader.c:56
@ ProhibitDTD
Definition: saxreader.c:57
@ SuppressValidationfatalError
Definition: saxreader.c:60
@ FeatureUnknown
Definition: saxreader.c:48
@ ServerHttpRequest
Definition: saxreader.c:59
@ ExternalGeneralEntities
Definition: saxreader.c:50
@ SchemaValidation
Definition: saxreader.c:58
@ LexicalHandlerParEntities
Definition: saxreader.c:63
@ ParameterEntities
Definition: saxreader.c:55
@ UseSchemaLocation
Definition: saxreader.c:62

Function Documentation

◆ alloc_element_entry()

static element_entry * alloc_element_entry ( const xmlChar local,
const xmlChar prefix,
int  nb_ns,
const xmlChar **  namespaces 
)
static

Definition at line 463 of file saxreader.c.

465{
467 int i;
468
469 ret = malloc(sizeof(*ret));
470 if (!ret) return ret;
471
472 ret->local = bstr_from_xmlChar(local);
473 ret->prefix = bstr_from_xmlChar(prefix);
474 ret->qname = build_qname(ret->prefix, ret->local);
475 ret->ns = nb_ns ? malloc(nb_ns * sizeof(ns)) : NULL;
476 ret->ns_count = nb_ns;
477
478 for (i=0; i < nb_ns; i++)
479 {
480 ret->ns[i].prefix = bstr_from_xmlChar(namespaces[2*i]);
481 ret->ns[i].uri = bstr_from_xmlChar(namespaces[2*i+1]);
482 }
483
484 return ret;
485}
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
static BSTR build_qname(BSTR prefix, BSTR local)
Definition: saxreader.c:445
return ret
Definition: mutex.c:146
#define local
Definition: zutil.h:30
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static BSTR bstr_from_xmlChar(const xmlChar *str)
Definition: saxreader.c:162
Definition: mxnamespace.c:38
Character const *const prefix
Definition: tempnam.cpp:195

Referenced by libxmlStartElementNS().

◆ bstr_from_xmlCharN()

static BSTR bstr_from_xmlCharN ( const xmlChar buf,
int  len 
)
static

Definition at line 605 of file saxreader.c.

606{
607 DWORD dLen;
608 BSTR bstr;
609
610 if (!buf)
611 return NULL;
612
613 dLen = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0);
614 if(len != -1) dLen++;
615 bstr = SysAllocStringLen(NULL, dLen-1);
616 if (!bstr)
617 return NULL;
618 MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, bstr, dLen);
619 if(len != -1) bstr[dLen-1] = '\0';
620
621 return bstr;
622}
OLECHAR * BSTR
Definition: compat.h:2293
#define MultiByteToWideChar
Definition: compat.h:110
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define CP_UTF8
Definition: nls.h:20
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by libxml_cdatablock(), pooled_bstr_from_xmlCharN(), and saxreader_get_cdata_chunk().

◆ bstr_pool_insert()

static BOOL bstr_pool_insert ( struct bstrpool pool,
BSTR  pool_entry 
)
static

Definition at line 566 of file saxreader.c.

567{
568 if (!pool->pool)
569 {
570 pool->pool = malloc(16 * sizeof(*pool->pool));
571 if (!pool->pool)
572 return FALSE;
573
574 pool->index = 0;
575 pool->len = 16;
576 }
577 else if (pool->index == pool->len)
578 {
579 BSTR *new_pool = realloc(pool->pool, pool->len * 2 * sizeof(*new_pool));
580
581 if (!new_pool)
582 return FALSE;
583
584 pool->pool = new_pool;
585 pool->len *= 2;
586 }
587
588 pool->pool[pool->index++] = pool_entry;
589 return TRUE;
590}
#define realloc
Definition: debug_ros.c:6
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117

Referenced by pooled_bstr_from_xmlChar(), and pooled_bstr_from_xmlCharN().

◆ build_qname()

static BSTR build_qname ( BSTR  prefix,
BSTR  local 
)
static

Definition at line 445 of file saxreader.c.

446{
447 if (prefix && *prefix)
448 {
450 WCHAR *ptr;
451
452 ptr = qname;
455 *ptr++ = ':';
457 return qname;
458 }
459 else
460 return SysAllocString(local);
461}
#define lstrcpyW
Definition: compat.h:749
static PVOID ptr
Definition: dispmode.c:27
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by alloc_element_entry().

◆ find_element_uri()

static BSTR find_element_uri ( saxlocator locator,
const xmlChar uri 
)
static

Definition at line 520 of file saxreader.c.

521{
523 BSTR uriW;
524 int i;
525
526 if (!uri) return NULL;
527
528 uriW = bstr_from_xmlChar(uri);
529
531 {
532 for (i=0; i < element->ns_count; i++)
533 if (!wcscmp(uriW, element->ns[i].uri))
534 {
535 SysFreeString(uriW);
536 return element->ns[i].uri;
537 }
538 }
539
540 SysFreeString(uriW);
541 ERR("namespace uri not found, %s\n", debugstr_a((char*)uri));
542 return NULL;
543}
#define ERR(fmt,...)
Definition: precomp.h:57
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_a
Definition: kernel32.h:31
const char * uri
Definition: sec_mgr.c:1588
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
struct list ns
Definition: writer.c:91

Referenced by libxmlEndElementNS(), libxmlStartElementNS(), and SAXAttributes_populate().

◆ format_error_message_from_id()

static void format_error_message_from_id ( saxlocator This,
HRESULT  hr 
)
static

Definition at line 667 of file saxreader.c.

668{
670 xmlStopParser(This->pParserCtxt);
671 This->ret = hr;
672
674 {
675 WCHAR msg[1024];
677 NULL, hr, 0, msg, ARRAY_SIZE(msg), NULL))
678 {
679 FIXME("MSXML errors not yet supported.\n");
680 msg[0] = '\0';
681 }
682
683 if(This->vbInterface)
684 {
685 BSTR bstrMsg = SysAllocString(msg);
686 IVBSAXErrorHandler_fatalError(handler->vbhandler,
687 &This->IVBSAXLocator_iface, &bstrMsg, hr);
688 SysFreeString(bstrMsg);
689 }
690 else
691 ISAXErrorHandler_fatalError(handler->handler,
692 &This->ISAXLocator_iface, msg, hr);
693 }
694}
#define msg(x)
Definition: auth_time.c:54
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
static BOOL saxreader_has_handler(const saxlocator *locator, enum saxhandler_type type)
Definition: saxreader.c:351
static struct saxerrorhandler_iface * saxreader_get_errorhandler(saxreader *reader)
Definition: saxreader.c:282
XMLPUBFUN void xmlStopParser(xmlParserCtxtPtr ctxt)
Definition: parser.c:12311
HRESULT hr
Definition: shlfolder.c:183
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:400

Referenced by libxml_cdatablock(), libxmlCharacters(), libxmlComment(), libxmlEndDocument(), libxmlEndElementNS(), libxmlSetDocumentLocator(), libxmlStartDocument(), and libxmlStartElementNS().

◆ free_attribute_values()

static void free_attribute_values ( saxlocator locator)
static

Definition at line 1429 of file saxreader.c.

1430{
1431 int i;
1432
1433 for (i = 0; i < locator->attr_count; i++)
1434 {
1435 SysFreeString(locator->attributes[i].szLocalname);
1436 locator->attributes[i].szLocalname = NULL;
1437
1438 SysFreeString(locator->attributes[i].szValue);
1439 locator->attributes[i].szValue = NULL;
1440
1441 SysFreeString(locator->attributes[i].szQName);
1442 locator->attributes[i].szQName = NULL;
1443 }
1444}

Referenced by libxmlEndElementNS(), and SAXAttributes_populate().

◆ free_bstr_pool()

static void free_bstr_pool ( struct bstrpool pool)
static

Definition at line 592 of file saxreader.c.

593{
594 unsigned int i;
595
596 for (i = 0; i < pool->index; i++)
597 SysFreeString(pool->pool[i]);
598
599 free(pool->pool);
600
601 pool->pool = NULL;
602 pool->index = pool->len = 0;
603}
#define free
Definition: debug_ros.c:5

Referenced by internal_parse(), and saxxmlreader_Release().

◆ free_element_entry()

static void free_element_entry ( element_entry element)
static

Definition at line 487 of file saxreader.c.

488{
489 int i;
490
491 for (i=0; i<element->ns_count;i++)
492 {
493 SysFreeString(element->ns[i].prefix);
494 SysFreeString(element->ns[i].uri);
495 }
496
498 SysFreeString(element->local);
500
501 free(element->ns);
502 free(element);
503}
strval prefix
Definition: reader.c:259
strval qname
Definition: reader.c:261

Referenced by isaxlocator_Release(), and libxmlEndElementNS().

◆ get_feature_value()

static HRESULT get_feature_value ( const saxreader reader,
saxreader_feature  feature,
VARIANT_BOOL value 
)
inlinestatic

Definition at line 434 of file saxreader.c.

435{
436 *value = reader->features & feature ? VARIANT_TRUE : VARIANT_FALSE;
437 return S_OK;
438}
#define S_OK
Definition: intsafe.h:52
INTERNETFEATURELIST feature
Definition: misc.c:1719
Definition: reader.h:84
Definition: pdh_main.c:96

Referenced by isaxxmlreader_getFeature().

◆ get_saxreader_feature()

static saxreader_feature get_saxreader_feature ( const WCHAR name)
static

Definition at line 122 of file saxreader.c.

123{
124 int min, max, n, c;
125
126 min = 0;
128
129 while (min <= max)
130 {
131 n = (min+max)/2;
132
134 if (!c)
135 return saxreader_feature_map[n].feature;
136
137 if (c > 0)
138 max = n-1;
139 else
140 min = n+1;
141 }
142
143 return FeatureUnknown;
144}
static const struct saxreader_feature_pair saxreader_feature_map[]
Definition: saxreader.c:111
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80
#define min(a, b)
Definition: monoChain.cc:55
Definition: name.c:39
#define max(a, b)
Definition: svc.c:63

Referenced by isaxxmlreader_getFeature(), and isaxxmlreader_putFeature().

◆ impl_from_ISAXAttributes()

◆ impl_from_ISAXLocator()

static saxlocator * impl_from_ISAXLocator ( ISAXLocator *  iface)
inlinestatic

◆ impl_from_ISAXXMLReader()

◆ impl_from_IVBSAXAttributes()

◆ impl_from_IVBSAXLocator()

static saxlocator * impl_from_IVBSAXLocator ( IVBSAXLocator *  iface)
inlinestatic

◆ impl_from_IVBSAXXMLReader()

◆ internal_getProperty()

static HRESULT internal_getProperty ( const saxreader This,
const WCHAR prop,
VARIANT value,
BOOL  vb 
)
static

Definition at line 2843 of file saxreader.c.

2844{
2845 TRACE("(%p)->(%s)\n", This, debugstr_w(prop));
2846
2847 if (!value) return E_POINTER;
2848
2850 {
2853 return S_OK;
2854 }
2855
2857 {
2860 return S_OK;
2861 }
2862
2864 {
2865 V_VT(value) = VT_BSTR;
2866 V_BSTR(value) = SysAllocString(This->xmldecl_version);
2867 return S_OK;
2868 }
2869
2870 FIXME("(%p)->(%s) unsupported property\n", This, debugstr_w(prop));
2871
2872 return E_NOTIMPL;
2873}
#define E_NOTIMPL
Definition: ddrawi.h:99
@ VT_BSTR
Definition: compat.h:2303
@ VT_UNKNOWN
Definition: compat.h:2308
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
static const WCHAR PropertyLexicalHandlerW[]
Definition: saxreader.c:393
static const WCHAR PropertyXmlDeclVersionW[]
Definition: saxreader.c:376
static HRESULT saxreader_get_handler(const saxreader *reader, enum saxhandler_type type, BOOL vb, void **ret)
Definition: saxreader.c:258
static const WCHAR PropertyDeclHandlerW[]
Definition: saxreader.c:379
#define debugstr_w
Definition: kernel32.h:32
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define TRACE(s)
Definition: solgame.cpp:4
#define E_POINTER
Definition: winerror.h:3480

Referenced by isaxxmlreader_getProperty(), and saxxmlreader_getProperty().

◆ internal_onDataAvailable()

static HRESULT internal_onDataAvailable ( void obj,
char ptr,
DWORD  len 
)
static

Definition at line 2707 of file saxreader.c.

2708{
2709 saxreader *This = obj;
2710
2712}
static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int size, BOOL vbInterface)
Definition: saxreader.c:2491

Referenced by internal_parseURL().

◆ internal_parse()

static HRESULT internal_parse ( saxreader This,
VARIANT  varInput,
BOOL  vbInterface 
)
static

Definition at line 2615 of file saxreader.c.

2619{
2620 HRESULT hr;
2621
2622 TRACE("(%p)->(%s)\n", This, debugstr_variant(&varInput));
2623
2624 /* Dispose of the BSTRs in the pool from a prior run, if any. */
2625 free_bstr_pool(&This->pool);
2626
2627 switch(V_VT(&varInput))
2628 {
2629 case VT_BSTR:
2630 case VT_BSTR|VT_BYREF:
2631 {
2632 BSTR str = V_ISBYREF(&varInput) ? *V_BSTRREF(&varInput) : V_BSTR(&varInput);
2633 hr = internal_parseBuffer(This, (const char*)str, lstrlenW(str)*sizeof(WCHAR), vbInterface);
2634 break;
2635 }
2636 case VT_ARRAY|VT_UI1: {
2637 void *pSAData;
2638 LONG lBound, uBound;
2639 ULONG dataRead;
2640
2641 hr = SafeArrayGetLBound(V_ARRAY(&varInput), 1, &lBound);
2642 if(hr != S_OK) break;
2643 hr = SafeArrayGetUBound(V_ARRAY(&varInput), 1, &uBound);
2644 if(hr != S_OK) break;
2645 dataRead = (uBound-lBound)*SafeArrayGetElemsize(V_ARRAY(&varInput));
2646 hr = SafeArrayAccessData(V_ARRAY(&varInput), &pSAData);
2647 if(hr != S_OK) break;
2648 hr = internal_parseBuffer(This, pSAData, dataRead, vbInterface);
2649 SafeArrayUnaccessData(V_ARRAY(&varInput));
2650 break;
2651 }
2652 case VT_UNKNOWN:
2653 case VT_DISPATCH: {
2655 IXMLDOMDocument *xmlDoc;
2656
2657 if (!V_UNKNOWN(&varInput))
2658 return E_INVALIDARG;
2659
2660 if(IUnknown_QueryInterface(V_UNKNOWN(&varInput),
2661 &IID_IXMLDOMDocument, (void**)&xmlDoc) == S_OK)
2662 {
2663 BSTR bstrData;
2664
2665 IXMLDOMDocument_get_xml(xmlDoc, &bstrData);
2666 hr = internal_parseBuffer(This, (const char*)bstrData,
2667 SysStringByteLen(bstrData), vbInterface);
2668 IXMLDOMDocument_Release(xmlDoc);
2669 SysFreeString(bstrData);
2670 break;
2671 }
2672
2673 /* try base interface first */
2674 IUnknown_QueryInterface(V_UNKNOWN(&varInput), &IID_ISequentialStream, (void**)&stream);
2675 if (!stream)
2676 /* this should never happen if IStream is implemented properly, but just in case */
2677 IUnknown_QueryInterface(V_UNKNOWN(&varInput), &IID_IStream, (void**)&stream);
2678
2679 if(stream)
2680 {
2681 hr = internal_parseStream(This, stream, vbInterface);
2682 ISequentialStream_Release(stream);
2683 }
2684 else
2685 {
2686 WARN("IUnknown* input doesn't support any of expected interfaces\n");
2687 hr = E_INVALIDARG;
2688 }
2689
2690 break;
2691 }
2692 default:
2693 WARN("vt %d not implemented\n", V_VT(&varInput));
2694 hr = E_INVALIDARG;
2695 }
2696
2697 return hr;
2698}
#define WARN(fmt,...)
Definition: precomp.h:61
#define E_INVALIDARG
Definition: ddrawi.h:101
@ VT_BYREF
Definition: compat.h:2342
@ VT_ARRAY
Definition: compat.h:2341
@ VT_DISPATCH
Definition: compat.h:2304
@ VT_UI1
Definition: compat.h:2311
#define lstrlenW
Definition: compat.h:750
static HRESULT internal_parseStream(saxreader *This, ISequentialStream *stream, BOOL vbInterface)
Definition: saxreader.c:2565
static void free_bstr_pool(struct bstrpool *pool)
Definition: saxreader.c:592
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
Definition: safearray.c:1033
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
Definition: safearray.c:1066
UINT WINAPI SafeArrayGetElemsize(SAFEARRAY *psa)
Definition: safearray.c:1114
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
UINT WINAPI SysStringByteLen(BSTR str)
Definition: oleaut.c:215
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_BSTRREF(A)
Definition: oleauto.h:227
#define V_ISBYREF(A)
Definition: oleauto.h:217
long LONG
Definition: pedump.c:60
const WCHAR * str
Definition: parse.h:23
uint32_t ULONG
Definition: typedefs.h:59

Referenced by isaxxmlreader_parse(), and saxxmlreader_parse().

◆ internal_parseBuffer()

static HRESULT internal_parseBuffer ( saxreader This,
const char buffer,
int  size,
BOOL  vbInterface 
)
static

Definition at line 2491 of file saxreader.c.

2492{
2496 HRESULT hr;
2497
2498 TRACE("(%p)->(%p %d)\n", This, buffer, size);
2499
2500 hr = SAXLocator_create(This, &locator, vbInterface);
2501 if (FAILED(hr))
2502 return hr;
2503
2504 if (size >= 4)
2505 {
2506 encoding = xmlDetectCharEncoding((xmlChar*)buffer, 4);
2508 TRACE("detected encoding: %s\n", enc_name);
2509 }
2510
2511 /* if libxml2 detection failed try to guess */
2512 if (encoding == XML_CHAR_ENCODING_NONE)
2513 {
2514 const WCHAR *ptr = (WCHAR*)buffer;
2515 /* an xml declaration with optional encoding will still be handled by the parser */
2516 if ((size >= 2) && *ptr == '<' && ptr[1] != '?')
2517 {
2519 encoding = XML_CHAR_ENCODING_UTF16LE;
2520 }
2521 }
2522 else if (encoding == XML_CHAR_ENCODING_UTF8)
2524 else
2525 enc_name = NULL;
2526
2528 if (!locator->pParserCtxt)
2529 {
2530 ISAXLocator_Release(&locator->ISAXLocator_iface);
2531 return E_FAIL;
2532 }
2533
2534 if (enc_name)
2535 {
2536 locator->pParserCtxt->encoding = xmlStrdup(enc_name);
2537 if (encoding == XML_CHAR_ENCODING_UTF16LE) {
2538 TRACE("switching to %s\n", enc_name);
2539 xmlSwitchEncoding(locator->pParserCtxt, encoding);
2540 }
2541 }
2542
2543 xmlFree(locator->pParserCtxt->sax);
2544 locator->pParserCtxt->sax = &locator->saxreader->sax;
2545 locator->pParserCtxt->userData = locator;
2546
2547 This->isParsing = TRUE;
2548 if(xmlParseDocument(locator->pParserCtxt) == -1 && locator->ret == S_OK)
2549 hr = E_FAIL;
2550 else
2551 hr = locator->ret;
2552 This->isParsing = FALSE;
2553
2554 if(locator->pParserCtxt)
2555 {
2556 locator->pParserCtxt->sax = NULL;
2557 xmlFreeParserCtxt(locator->pParserCtxt);
2558 locator->pParserCtxt = NULL;
2559 }
2560
2561 ISAXLocator_Release(&locator->ISAXLocator_iface);
2562 return hr;
2563}
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, BOOL vbInterface)
Definition: saxreader.c:2432
const char * xmlGetCharEncodingName(xmlCharEncoding enc)
Definition: encoding.c:1229
xmlCharEncoding xmlDetectCharEncoding(const unsigned char *in, int len)
Definition: encoding.c:916
xmlCharEncoding
Definition: encoding.h:65
@ XML_CHAR_ENCODING_UTF8
Definition: encoding.h:68
@ XML_CHAR_ENCODING_UTF16LE
Definition: encoding.h:69
@ XML_CHAR_ENCODING_NONE
Definition: encoding.h:67
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
static const char * enc_name(unsigned char enc)
Definition: id3.c:433
#define FAILED(hr)
Definition: intsafe.h:51
XMLPUBFUN xmlParserCtxtPtr xmlCreateMemoryParserCtxt(const char *buffer, int size)
Definition: parser.c:13996
XMLPUBFUN int xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
xmlFreeFunc xmlFree
Definition: globals.c:184
XMLPUBFUN int xmlParseDocument(xmlParserCtxtPtr ctxt)
Definition: parser.c:11009
XMLPUBFUN void xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
unsigned char xmlChar
Definition: xmlstring.h:28
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:69

Referenced by internal_onDataAvailable(), internal_parse(), and internal_vbonDataAvailable().

◆ internal_parseStream()

static HRESULT internal_parseStream ( saxreader This,
ISequentialStream stream,
BOOL  vbInterface 
)
static

Definition at line 2565 of file saxreader.c.

2566{
2568 HRESULT hr;
2569 ULONG dataRead;
2570 char data[2048];
2571 int ret;
2572
2573 dataRead = 0;
2574 hr = ISequentialStream_Read(stream, data, sizeof(data), &dataRead);
2575 if(FAILED(hr)) return hr;
2576
2577 hr = SAXLocator_create(This, &locator, vbInterface);
2578 if(FAILED(hr)) return hr;
2579
2580 locator->pParserCtxt = xmlCreatePushParserCtxt(
2581 &locator->saxreader->sax, locator,
2582 data, dataRead, NULL);
2583 if(!locator->pParserCtxt)
2584 {
2585 ISAXLocator_Release(&locator->ISAXLocator_iface);
2586 return E_FAIL;
2587 }
2588
2589 This->isParsing = TRUE;
2590
2591 do {
2592 dataRead = 0;
2593 hr = ISequentialStream_Read(stream, data, sizeof(data), &dataRead);
2594 if (FAILED(hr) || !dataRead) break;
2595
2596 ret = xmlParseChunk(locator->pParserCtxt, data, dataRead, 0);
2597 hr = ret!=XML_ERR_OK && locator->ret==S_OK ? E_FAIL : locator->ret;
2598 }while(hr == S_OK);
2599
2600 if(SUCCEEDED(hr))
2601 {
2602 ret = xmlParseChunk(locator->pParserCtxt, data, 0, 1);
2603 hr = ret!=XML_ERR_OK && locator->ret==S_OK ? E_FAIL : locator->ret;
2604 }
2605
2606
2607 This->isParsing = FALSE;
2608
2609 xmlFreeParserCtxt(locator->pParserCtxt);
2610 locator->pParserCtxt = NULL;
2611 ISAXLocator_Release(&locator->ISAXLocator_iface);
2612 return hr;
2613}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define SUCCEEDED(hr)
Definition: intsafe.h:50
@ XML_ERR_OK
Definition: xmlerror.h:100

Referenced by internal_parse().

◆ internal_parseURL()

static HRESULT internal_parseURL ( saxreader reader,
const WCHAR url,
BOOL  vbInterface 
)
static

Definition at line 2714 of file saxreader.c.

2715{
2716 IMoniker *mon;
2717 bsc_t *bsc;
2718 HRESULT hr;
2719
2720 TRACE("%p, %s.\n", reader, debugstr_w(url));
2721
2722 if (!url && reader->version < MSXML4)
2723 return E_INVALIDARG;
2724
2726 if(FAILED(hr))
2727 return hr;
2728
2729 if(vbInterface) hr = bind_url(mon, internal_vbonDataAvailable, reader, &bsc);
2731 IMoniker_Release(mon);
2732
2733 if(FAILED(hr))
2734 return hr;
2735
2736 return detach_bsc(bsc);
2737}
HRESULT detach_bsc(bsc_t *bsc)
Definition: bsc.c:342
HRESULT bind_url(IMoniker *mon, HRESULT(*onDataAvailable)(void *, char *, DWORD), void *obj, bsc_t **ret)
Definition: bsc.c:299
HRESULT create_moniker_from_url(LPCWSTR url, IMoniker **mon)
Definition: bsc.c:284
static HRESULT internal_onDataAvailable(void *obj, char *ptr, DWORD len)
Definition: saxreader.c:2707
static HRESULT internal_vbonDataAvailable(void *obj, char *ptr, DWORD len)
Definition: saxreader.c:2700
static const WCHAR url[]
Definition: encode.c:1384
@ MSXML4
Definition: msxml_dispex.h:32
Definition: bsc.c:39
Definition: xmldoc.c:231

Referenced by isaxxmlreader_parseURL(), and saxxmlreader_parseURL().

◆ internal_putProperty()

static HRESULT internal_putProperty ( saxreader This,
const WCHAR prop,
VARIANT  value,
BOOL  vbInterface 
)
static

Definition at line 2784 of file saxreader.c.

2789{
2790 VARIANT *v;
2791
2792 TRACE("(%p)->(%s %s)\n", This, debugstr_w(prop), debugstr_variant(&value));
2793
2794 if (This->isParsing) return E_FAIL;
2795
2799
2802
2804 {
2805 if (V_VT(v) == VT_I4 && V_I4(v) == 0) return S_OK;
2806 FIXME("(%p)->(%s): max-xml-size unsupported\n", This, debugstr_variant(v));
2807 return E_NOTIMPL;
2808 }
2809
2811 {
2812 if (V_VT(v) == VT_I4 && V_I4(v) == 0) return S_OK;
2813 FIXME("(%p)->(%s): max-element-depth unsupported\n", This, debugstr_variant(v));
2814 return E_NOTIMPL;
2815 }
2816
2817 FIXME("(%p)->(%s:%s): unsupported property\n", This, debugstr_w(prop), debugstr_variant(v));
2818
2819 if(!memcmp(prop, PropertyCharsetW, sizeof(PropertyCharsetW)))
2820 return E_NOTIMPL;
2821
2822 if(!memcmp(prop, PropertyDomNodeW, sizeof(PropertyDomNodeW)))
2823 return E_FAIL;
2824
2826 return E_NOTIMPL;
2827
2829 return E_NOTIMPL;
2830
2832 return E_FAIL;
2833
2835 return E_FAIL;
2836
2838 return E_FAIL;
2839
2840 return E_INVALIDARG;
2841}
@ VT_VARIANT
Definition: compat.h:2307
@ VT_I4
Definition: compat.h:2298
static const WCHAR PropertyMaxElementDepthW[]
Definition: saxreader.c:398
static const WCHAR PropertyMaxXMLSizeW[]
Definition: saxreader.c:401
static const WCHAR PropertySchemaDeclHandlerW[]
Definition: saxreader.c:404
static HRESULT saxreader_put_handler_from_variant(saxreader *This, enum saxhandler_type type, const VARIANT *v, BOOL vb)
Definition: saxreader.c:2739
static const WCHAR PropertyXMLDeclStandaloneW[]
Definition: saxreader.c:411
static const WCHAR PropertyXMLDeclVersionW[]
Definition: saxreader.c:414
static const WCHAR PropertyInputSourceW[]
Definition: saxreader.c:390
static const WCHAR PropertyDomNodeW[]
Definition: saxreader.c:385
static const WCHAR PropertyCharsetW[]
Definition: saxreader.c:373
static const WCHAR PropertyXMLDeclEncodingW[]
Definition: saxreader.c:408
const GLdouble * v
Definition: gl.h:2040
#define V_VARIANTREF(A)
Definition: oleauto.h:283
#define V_I4(A)
Definition: oleauto.h:247

Referenced by isaxxmlreader_putProperty(), and saxxmlreader_putProperty().

◆ internal_vbonDataAvailable()

static HRESULT internal_vbonDataAvailable ( void obj,
char ptr,
DWORD  len 
)
static

Definition at line 2700 of file saxreader.c.

2701{
2702 saxreader *This = obj;
2703
2705}

Referenced by internal_parseURL().

◆ is_namespaces_enabled()

static BOOL is_namespaces_enabled ( const saxreader reader)
static

Definition at line 440 of file saxreader.c.

441{
442 return (reader->version < MSXML4) || (reader->features & Namespaces);
443}

Referenced by libxmlEndElementNS(), and libxmlStartElementNS().

◆ is_valid_attr_index()

static BOOL is_valid_attr_index ( const saxlocator locator,
int  index 
)
inlinestatic

Definition at line 1116 of file saxreader.c.

1117{
1118 return index < locator->attr_count && index >= 0;
1119}
GLuint index
Definition: glext.h:6031

Referenced by isaxattributes_getLocalName(), isaxattributes_getName(), isaxattributes_getQName(), isaxattributes_getURI(), and isaxattributes_getValue().

◆ isaxattributes_AddRef()

static ULONG WINAPI isaxattributes_AddRef ( ISAXAttributes iface)
static

Definition at line 1089 of file saxreader.c.

1090{
1092 TRACE("%p\n", This);
1093 return ISAXLocator_AddRef(&This->ISAXLocator_iface);
1094}
static saxlocator * impl_from_ISAXAttributes(ISAXAttributes *iface)
Definition: saxreader.c:346

◆ isaxattributes_getIndexFromName()

static HRESULT WINAPI isaxattributes_getIndexFromName ( ISAXAttributes iface,
const WCHAR pUri,
int  cUriLength,
const WCHAR pLocalName,
int  cocalNameLength,
int index 
)
static

Definition at line 1206 of file saxreader.c.

1213{
1215 int i;
1216 TRACE("(%p)->(%s, %d, %s, %d)\n", This, debugstr_w(pUri), cUriLength,
1217 debugstr_w(pLocalName), cocalNameLength);
1218
1219 if(!pUri || !pLocalName || !index) return E_POINTER;
1220
1221 for(i=0; i<This->attr_count; i++)
1222 {
1223 if(cUriLength!=SysStringLen(This->attributes[i].szURI)
1224 || cocalNameLength!=SysStringLen(This->attributes[i].szLocalname))
1225 continue;
1226 if(cUriLength && memcmp(pUri, This->attributes[i].szURI,
1227 sizeof(WCHAR)*cUriLength))
1228 continue;
1229 if(cocalNameLength && memcmp(pLocalName, This->attributes[i].szLocalname,
1230 sizeof(WCHAR)*cocalNameLength))
1231 continue;
1232
1233 *index = i;
1234 return S_OK;
1235 }
1236
1237 return E_INVALIDARG;
1238}

◆ isaxattributes_getIndexFromQName()

static HRESULT WINAPI isaxattributes_getIndexFromQName ( ISAXAttributes iface,
const WCHAR pQName,
int  nQNameLength,
int index 
)
static

Definition at line 1240 of file saxreader.c.

1245{
1247 int i;
1248 TRACE("(%p)->(%s, %d)\n", This, debugstr_w(pQName), nQNameLength);
1249
1250 if(!pQName || !index) return E_POINTER;
1251 if(!nQNameLength) return E_INVALIDARG;
1252
1253 for(i=0; i<This->attr_count; i++)
1254 {
1255 if(nQNameLength!=SysStringLen(This->attributes[i].szQName)) continue;
1256 if(memcmp(pQName, This->attributes[i].szQName, sizeof(WCHAR)*nQNameLength)) continue;
1257
1258 *index = i;
1259 return S_OK;
1260 }
1261
1262 return E_INVALIDARG;
1263}

◆ isaxattributes_getLength()

static HRESULT WINAPI isaxattributes_getLength ( ISAXAttributes iface,
int length 
)
static

Definition at line 1105 of file saxreader.c.

1108{
1110
1111 *length = This->attr_count;
1112 TRACE("Length set to %d\n", *length);
1113 return S_OK;
1114}
GLuint GLsizei GLsizei * length
Definition: glext.h:6040

◆ isaxattributes_getLocalName()

static HRESULT WINAPI isaxattributes_getLocalName ( ISAXAttributes iface,
int  index,
const WCHAR **  pLocalName,
int pLocalNameLength 
)
static

Definition at line 1141 of file saxreader.c.

1146{
1148 TRACE("(%p)->(%d)\n", This, index);
1149
1151 if(!pLocalName || !pLocalNameLength) return E_POINTER;
1152
1153 *pLocalNameLength = SysStringLen(This->attributes[index].szLocalname);
1154 *pLocalName = This->attributes[index].szLocalname;
1155
1156 return S_OK;
1157}
#define index(s, c)
Definition: various.h:29
static BOOL is_valid_attr_index(const saxlocator *locator, int index)
Definition: saxreader.c:1116

◆ isaxattributes_getName()

static HRESULT WINAPI isaxattributes_getName ( ISAXAttributes iface,
int  index,
const WCHAR **  uri,
int pUriLength,
const WCHAR **  localName,
int pLocalNameSize,
const WCHAR **  QName,
int pQNameLength 
)
static

Definition at line 1177 of file saxreader.c.

1186{
1188 TRACE("(%p)->(%d)\n", This, index);
1189
1191 if(!uri || !pUriLength || !localName || !pLocalNameSize
1192 || !QName || !pQNameLength) return E_POINTER;
1193
1194 *pUriLength = SysStringLen(This->attributes[index].szURI);
1195 *uri = This->attributes[index].szURI;
1196 *pLocalNameSize = SysStringLen(This->attributes[index].szLocalname);
1197 *localName = This->attributes[index].szLocalname;
1198 *pQNameLength = SysStringLen(This->attributes[index].szQName);
1199 *QName = This->attributes[index].szQName;
1200
1201 TRACE("(%s, %s, %s)\n", debugstr_w(*uri), debugstr_w(*localName), debugstr_w(*QName));
1202
1203 return S_OK;
1204}

◆ isaxattributes_getQName()

static HRESULT WINAPI isaxattributes_getQName ( ISAXAttributes iface,
int  index,
const WCHAR **  pQName,
int pQNameLength 
)
static

Definition at line 1159 of file saxreader.c.

1164{
1166 TRACE("(%p)->(%d)\n", This, index);
1167
1169 if(!pQName || !pQNameLength) return E_POINTER;
1170
1171 *pQNameLength = SysStringLen(This->attributes[index].szQName);
1172 *pQName = This->attributes[index].szQName;
1173
1174 return S_OK;
1175}

◆ isaxattributes_getType()

static HRESULT WINAPI isaxattributes_getType ( ISAXAttributes iface,
int  nIndex,
const WCHAR **  pType,
int pTypeLength 
)
static

Definition at line 1265 of file saxreader.c.

1270{
1272
1273 FIXME("(%p)->(%d) stub\n", This, nIndex);
1274 return E_NOTIMPL;
1275}

◆ isaxattributes_getTypeFromName()

static HRESULT WINAPI isaxattributes_getTypeFromName ( ISAXAttributes iface,
const WCHAR pUri,
int  nUri,
const WCHAR pLocalName,
int  nLocalName,
const WCHAR **  pType,
int nType 
)
static

Definition at line 1277 of file saxreader.c.

1285{
1287
1288 FIXME("(%p)->(%s, %d, %s, %d) stub\n", This, debugstr_w(pUri), nUri,
1289 debugstr_w(pLocalName), nLocalName);
1290 return E_NOTIMPL;
1291}

◆ isaxattributes_getTypeFromQName()

static HRESULT WINAPI isaxattributes_getTypeFromQName ( ISAXAttributes iface,
const WCHAR pQName,
int  nQName,
const WCHAR **  pType,
int nType 
)
static

Definition at line 1293 of file saxreader.c.

1299{
1301
1302 FIXME("(%p)->(%s, %d) stub\n", This, debugstr_w(pQName), nQName);
1303 return E_NOTIMPL;
1304}

◆ isaxattributes_getURI()

static HRESULT WINAPI isaxattributes_getURI ( ISAXAttributes iface,
int  index,
const WCHAR **  url,
int size 
)
static

Definition at line 1121 of file saxreader.c.

1126{
1128 TRACE("(%p)->(%d)\n", This, index);
1129
1131 if(!url || !size) return E_POINTER;
1132
1133 *size = SysStringLen(This->attributes[index].szURI);
1134 *url = This->attributes[index].szURI;
1135
1136 TRACE("(%s:%d)\n", debugstr_w(This->attributes[index].szURI), *size);
1137
1138 return S_OK;
1139}

◆ isaxattributes_getValue()

static HRESULT WINAPI isaxattributes_getValue ( ISAXAttributes iface,
int  index,
const WCHAR **  value,
int nValue 
)
static

Definition at line 1306 of file saxreader.c.

1311{
1313 TRACE("(%p)->(%d)\n", This, index);
1314
1316 if(!value || !nValue) return E_POINTER;
1317
1318 *nValue = SysStringLen(This->attributes[index].szValue);
1319 *value = This->attributes[index].szValue;
1320
1321 TRACE("(%s:%d)\n", debugstr_w(*value), *nValue);
1322
1323 return S_OK;
1324}

◆ isaxattributes_getValueFromName()

static HRESULT WINAPI isaxattributes_getValueFromName ( ISAXAttributes iface,
const WCHAR pUri,
int  nUri,
const WCHAR pLocalName,
int  nLocalName,
const WCHAR **  pValue,
int nValue 
)
static

Definition at line 1326 of file saxreader.c.

1334{
1335 HRESULT hr;
1336 int index;
1338 TRACE("(%p)->(%s, %d, %s, %d)\n", This, debugstr_w(pUri), nUri,
1339 debugstr_w(pLocalName), nLocalName);
1340
1341 hr = ISAXAttributes_getIndexFromName(iface,
1342 pUri, nUri, pLocalName, nLocalName, &index);
1343 if(hr==S_OK) hr = ISAXAttributes_getValue(iface, index, pValue, nValue);
1344
1345 return hr;
1346}
PWCHAR pValue

◆ isaxattributes_getValueFromQName()

static HRESULT WINAPI isaxattributes_getValueFromQName ( ISAXAttributes iface,
const WCHAR pQName,
int  nQName,
const WCHAR **  pValue,
int nValue 
)
static

Definition at line 1348 of file saxreader.c.

1354{
1355 HRESULT hr;
1356 int index;
1358 TRACE("(%p)->(%s, %d)\n", This, debugstr_w(pQName), nQName);
1359
1360 hr = ISAXAttributes_getIndexFromQName(iface, pQName, nQName, &index);
1361 if(hr==S_OK) hr = ISAXAttributes_getValue(iface, index, pValue, nValue);
1362
1363 return hr;
1364}

◆ isaxattributes_QueryInterface()

static HRESULT WINAPI isaxattributes_QueryInterface ( ISAXAttributes iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1079 of file saxreader.c.

1083{
1085 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
1086 return ISAXLocator_QueryInterface(&This->ISAXLocator_iface, riid, ppvObject);
1087}
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35

◆ isaxattributes_Release()

static ULONG WINAPI isaxattributes_Release ( ISAXAttributes iface)
static

Definition at line 1096 of file saxreader.c.

1097{
1099
1100 TRACE("%p\n", This);
1101 return ISAXLocator_Release(&This->ISAXLocator_iface);
1102}

◆ isaxlocator_AddRef()

static ULONG WINAPI isaxlocator_AddRef ( ISAXLocator *  iface)
static

Definition at line 2309 of file saxreader.c.

2310{
2313 TRACE("%p, refcount %lu.\n", iface, ref);
2314 return ref;
2315}
#define InterlockedIncrement
Definition: armddk.h:53
static saxlocator * impl_from_ISAXLocator(ISAXLocator *iface)
Definition: saxreader.c:336
Definition: send.c:48

◆ isaxlocator_getColumnNumber()

static HRESULT WINAPI isaxlocator_getColumnNumber ( ISAXLocator *  iface,
int pnColumn 
)
static

Definition at line 2357 of file saxreader.c.

2360{
2362
2363 *pnColumn = This->column;
2364 return S_OK;
2365}

◆ isaxlocator_getLineNumber()

static HRESULT WINAPI isaxlocator_getLineNumber ( ISAXLocator *  iface,
int pnLine 
)
static

Definition at line 2367 of file saxreader.c.

2370{
2372
2373 *pnLine = This->line;
2374 return S_OK;
2375}

◆ isaxlocator_getPublicId()

static HRESULT WINAPI isaxlocator_getPublicId ( ISAXLocator *  iface,
const WCHAR **  ppwchPublicId 
)
static

Definition at line 2377 of file saxreader.c.

2380{
2381 BSTR publicId;
2383
2384 SysFreeString(This->publicId);
2385
2386 publicId = bstr_from_xmlChar(xmlSAX2GetPublicId(This->pParserCtxt));
2387 if(SysStringLen(publicId))
2388 This->publicId = publicId;
2389 else
2390 {
2391 SysFreeString(publicId);
2392 This->publicId = NULL;
2393 }
2394
2395 *ppwchPublicId = This->publicId;
2396 return S_OK;
2397}
XMLPUBFUN const xmlChar * xmlSAX2GetPublicId(void *ctx)

◆ isaxlocator_getSystemId()

static HRESULT WINAPI isaxlocator_getSystemId ( ISAXLocator *  iface,
const WCHAR **  ppwchSystemId 
)
static

Definition at line 2399 of file saxreader.c.

2402{
2403 BSTR systemId;
2405
2406 SysFreeString(This->systemId);
2407
2408 systemId = bstr_from_xmlChar(xmlSAX2GetSystemId(This->pParserCtxt));
2409 if(SysStringLen(systemId))
2410 This->systemId = systemId;
2411 else
2412 {
2413 SysFreeString(systemId);
2414 This->systemId = NULL;
2415 }
2416
2417 *ppwchSystemId = This->systemId;
2418 return S_OK;
2419}
XMLPUBFUN const xmlChar * xmlSAX2GetSystemId(void *ctx)
Definition: SAX2.c:227

◆ isaxlocator_QueryInterface()

static HRESULT WINAPI isaxlocator_QueryInterface ( ISAXLocator *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 2281 of file saxreader.c.

2282{
2284
2285 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
2286
2287 *ppvObject = NULL;
2288
2289 if ( IsEqualGUID( riid, &IID_IUnknown ) ||
2290 IsEqualGUID( riid, &IID_ISAXLocator ))
2291 {
2292 *ppvObject = iface;
2293 }
2294 else if ( IsEqualGUID( riid, &IID_ISAXAttributes ))
2295 {
2296 *ppvObject = &This->ISAXAttributes_iface;
2297 }
2298 else
2299 {
2300 WARN("interface %s not implemented\n", debugstr_guid(riid));
2301 return E_NOINTERFACE;
2302 }
2303
2304 ISAXLocator_AddRef( iface );
2305
2306 return S_OK;
2307}
const GUID IID_IUnknown
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ isaxlocator_Release()

static ULONG WINAPI isaxlocator_Release ( ISAXLocator *  iface)
static

Definition at line 2317 of file saxreader.c.

2319{
2322
2323 TRACE("%p, refcount %ld.\n", iface, ref );
2324
2325 if (!ref)
2326 {
2327 element_entry *element, *element2;
2328 int index;
2329
2330 SysFreeString(This->publicId);
2331 SysFreeString(This->systemId);
2332 SysFreeString(This->namespaceUri);
2333
2334 for(index = 0; index < This->attr_alloc_count; index++)
2335 {
2336 SysFreeString(This->attributes[index].szLocalname);
2337 SysFreeString(This->attributes[index].szValue);
2338 SysFreeString(This->attributes[index].szQName);
2339 }
2340 free(This->attributes);
2341
2342 /* element stack */
2344 {
2347 }
2348
2349 ISAXXMLReader_Release(&This->saxreader->ISAXXMLReader_iface);
2350 free(This);
2351 }
2352
2353 return ref;
2354}
#define InterlockedDecrement
Definition: armddk.h:52
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void free_element_entry(element_entry *element)
Definition: saxreader.c:487
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: reader.c:258

◆ isaxxmlreader_AddRef()

static ULONG WINAPI isaxxmlreader_AddRef ( ISAXXMLReader *  iface)
static

Definition at line 3184 of file saxreader.c.

3185{
3187 return IVBSAXXMLReader_AddRef(&This->IVBSAXXMLReader_iface);
3188}
static saxreader * impl_from_ISAXXMLReader(ISAXXMLReader *iface)
Definition: saxreader.c:326

◆ isaxxmlreader_getBaseURL()

static HRESULT WINAPI isaxxmlreader_getBaseURL ( ISAXXMLReader *  iface,
const WCHAR **  base_url 
)
static

Definition at line 3336 of file saxreader.c.

3339{
3341
3342 FIXME("(%p)->(%p) stub\n", This, base_url);
3343 return E_NOTIMPL;
3344}
const char * base_url
Definition: mimeole.c:1466

◆ isaxxmlreader_getContentHandler()

static HRESULT WINAPI isaxxmlreader_getContentHandler ( ISAXXMLReader *  iface,
ISAXContentHandler **  handler 
)
static

Definition at line 3290 of file saxreader.c.

3293{
3296}

◆ isaxxmlreader_getDTDHandler()

static HRESULT WINAPI isaxxmlreader_getDTDHandler ( ISAXXMLReader *  iface,
ISAXDTDHandler **  handler 
)
static

Definition at line 3306 of file saxreader.c.

3309{
3312}

◆ isaxxmlreader_getEntityResolver()

static HRESULT WINAPI isaxxmlreader_getEntityResolver ( ISAXXMLReader *  iface,
ISAXEntityResolver **  resolver 
)
static

Definition at line 3274 of file saxreader.c.

3277{
3279 return saxreader_get_handler(This, SAXEntityResolver, FALSE, (void**)resolver);
3280}

◆ isaxxmlreader_getErrorHandler()

static HRESULT WINAPI isaxxmlreader_getErrorHandler ( ISAXXMLReader *  iface,
ISAXErrorHandler **  handler 
)
static

Definition at line 3322 of file saxreader.c.

3325{
3328}

◆ isaxxmlreader_getFeature()

static HRESULT WINAPI isaxxmlreader_getFeature ( ISAXXMLReader *  iface,
const WCHAR feature_name,
VARIANT_BOOL value 
)
static

Definition at line 3197 of file saxreader.c.

3201{
3204
3205 TRACE("(%p)->(%s %p)\n", This, debugstr_w(feature_name), value);
3206
3207 feature = get_saxreader_feature(feature_name);
3208
3209 if (This->version < MSXML4 && (feature == ExhaustiveErrors || feature == SchemaValidation))
3210 return E_INVALIDARG;
3211
3212 if (feature == Namespaces ||
3217
3218 FIXME("(%p)->(%s %p) stub\n", This, debugstr_w(feature_name), value);
3219 return E_NOTIMPL;
3220}
static HRESULT get_feature_value(const saxreader *reader, saxreader_feature feature, VARIANT_BOOL *value)
Definition: saxreader.c:434
static saxreader_feature get_saxreader_feature(const WCHAR *name)
Definition: saxreader.c:122

◆ isaxxmlreader_getProperty()

static HRESULT WINAPI isaxxmlreader_getProperty ( ISAXXMLReader *  iface,
const WCHAR prop,
VARIANT value 
)
static

Definition at line 3256 of file saxreader.c.

3260{
3262 return internal_getProperty(This, prop, value, FALSE);
3263}
static HRESULT internal_getProperty(const saxreader *This, const WCHAR *prop, VARIANT *value, BOOL vb)
Definition: saxreader.c:2843

◆ isaxxmlreader_getSecureBaseURL()

static HRESULT WINAPI isaxxmlreader_getSecureBaseURL ( ISAXXMLReader *  iface,
const WCHAR **  pSecureBaseUrl 
)
static

Definition at line 3356 of file saxreader.c.

3359{
3361 FIXME("(%p)->(%p) stub\n", This, pSecureBaseUrl);
3362 return E_NOTIMPL;
3363}

◆ isaxxmlreader_parse()

static HRESULT WINAPI isaxxmlreader_parse ( ISAXXMLReader *  iface,
VARIANT  varInput 
)
static

Definition at line 3375 of file saxreader.c.

3378{
3380 return internal_parse(This, varInput, FALSE);
3381}
static HRESULT internal_parse(saxreader *This, VARIANT varInput, BOOL vbInterface)
Definition: saxreader.c:2615

◆ isaxxmlreader_parseURL()

static HRESULT WINAPI isaxxmlreader_parseURL ( ISAXXMLReader *  iface,
const WCHAR url 
)
static

Definition at line 3383 of file saxreader.c.

3386{
3388 return internal_parseURL(This, url, FALSE);
3389}
static HRESULT internal_parseURL(saxreader *reader, const WCHAR *url, BOOL vbInterface)
Definition: saxreader.c:2714

◆ isaxxmlreader_putBaseURL()

static HRESULT WINAPI isaxxmlreader_putBaseURL ( ISAXXMLReader *  iface,
const WCHAR pBaseUrl 
)
static

Definition at line 3346 of file saxreader.c.

3349{
3351
3352 FIXME("(%p)->(%s) stub\n", This, debugstr_w(pBaseUrl));
3353 return E_NOTIMPL;
3354}

◆ isaxxmlreader_putContentHandler()

static HRESULT WINAPI isaxxmlreader_putContentHandler ( ISAXXMLReader *  iface,
ISAXContentHandler handler 
)
static

Definition at line 3298 of file saxreader.c.

3301{
3304}
static HRESULT saxreader_put_handler(saxreader *reader, enum saxhandler_type type, void *ptr, BOOL vb)
Definition: saxreader.c:239

◆ isaxxmlreader_putDTDHandler()

static HRESULT WINAPI isaxxmlreader_putDTDHandler ( ISAXXMLReader *  iface,
ISAXDTDHandler *  handler 
)
static

Definition at line 3314 of file saxreader.c.

◆ isaxxmlreader_putEntityResolver()

static HRESULT WINAPI isaxxmlreader_putEntityResolver ( ISAXXMLReader *  iface,
ISAXEntityResolver *  resolver 
)
static

Definition at line 3282 of file saxreader.c.

3285{
3288}

◆ isaxxmlreader_putErrorHandler()

static HRESULT WINAPI isaxxmlreader_putErrorHandler ( ISAXXMLReader *  iface,
ISAXErrorHandler *  handler 
)
static

Definition at line 3330 of file saxreader.c.

◆ isaxxmlreader_putFeature()

static HRESULT WINAPI isaxxmlreader_putFeature ( ISAXXMLReader *  iface,
const WCHAR feature_name,
VARIANT_BOOL  value 
)
static

Definition at line 3222 of file saxreader.c.

3226{
3229
3230 TRACE("(%p)->(%s %x)\n", This, debugstr_w(feature_name), value);
3231
3232 feature = get_saxreader_feature(feature_name);
3233
3234 /* accepted cases */
3235 if ((feature == ExhaustiveErrors && value == VARIANT_FALSE) ||
3236 (feature == SchemaValidation && value == VARIANT_FALSE) ||
3237 feature == Namespaces ||
3239 {
3241 }
3242
3244 feature == ProhibitDTD ||
3247 {
3248 FIXME("(%p)->(%s %x) stub\n", This, debugstr_w(feature_name), value);
3250 }
3251
3252 FIXME("(%p)->(%s %x) stub\n", This, debugstr_w(feature_name), value);
3253 return E_NOTIMPL;
3254}
static HRESULT set_feature_value(saxreader *reader, saxreader_feature feature, VARIANT_BOOL value)
Definition: saxreader.c:418

◆ isaxxmlreader_putProperty()

static HRESULT WINAPI isaxxmlreader_putProperty ( ISAXXMLReader *  iface,
const WCHAR pProp,
VARIANT  value 
)
static

Definition at line 3265 of file saxreader.c.

3269{
3271 return internal_putProperty(This, pProp, value, FALSE);
3272}
static HRESULT internal_putProperty(saxreader *This, const WCHAR *prop, VARIANT value, BOOL vbInterface)
Definition: saxreader.c:2784

◆ isaxxmlreader_putSecureBaseURL()

static HRESULT WINAPI isaxxmlreader_putSecureBaseURL ( ISAXXMLReader *  iface,
const WCHAR secureBaseUrl 
)
static

Definition at line 3365 of file saxreader.c.

3368{
3370
3371 FIXME("(%p)->(%s) stub\n", This, debugstr_w(secureBaseUrl));
3372 return E_NOTIMPL;
3373}

◆ isaxxmlreader_QueryInterface()

static HRESULT WINAPI isaxxmlreader_QueryInterface ( ISAXXMLReader *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 3178 of file saxreader.c.

3179{
3181 return IVBSAXXMLReader_QueryInterface(&This->IVBSAXXMLReader_iface, riid, ppvObject);
3182}

◆ isaxxmlreader_Release()

static ULONG WINAPI isaxxmlreader_Release ( ISAXXMLReader *  iface)
static

Definition at line 3190 of file saxreader.c.

3191{
3193 return IVBSAXXMLReader_Release(&This->IVBSAXXMLReader_iface);
3194}

◆ iterate_endprefix_index()

static BOOL iterate_endprefix_index ( saxlocator This,
const element_entry element,
int i 
)
inlinestatic

Definition at line 552 of file saxreader.c.

553{
554 if (This->saxreader->version >= MSXML4)
555 {
556 if (*i == -1) *i = 0; else ++*i;
557 return *i < element->ns_count;
558 }
559 else
560 {
561 if (*i == -1) *i = element->ns_count-1; else --*i;
562 return *i >= 0;
563 }
564}

Referenced by libxmlEndElementNS().

◆ ivbsaxattributes_AddRef()

static ULONG WINAPI ivbsaxattributes_AddRef ( IVBSAXAttributes *  iface)
static

Definition at line 725 of file saxreader.c.

726{
728 return IVBSAXLocator_AddRef(&This->IVBSAXLocator_iface);
729}
static saxlocator * impl_from_IVBSAXAttributes(IVBSAXAttributes *iface)
Definition: saxreader.c:341

◆ ivbsaxattributes_get_length()

static HRESULT WINAPI ivbsaxattributes_get_length ( IVBSAXAttributes *  iface,
int nLength 
)
static

Definition at line 812 of file saxreader.c.

815{
817 return ISAXAttributes_getLength(&This->ISAXAttributes_iface, nLength);
818}
WINBASEAPI _In_ DWORD nLength
Definition: wincon.h:682

◆ ivbsaxattributes_GetIDsOfNames()

static HRESULT WINAPI ivbsaxattributes_GetIDsOfNames ( IVBSAXAttributes *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 757 of file saxreader.c.

764{
766 HRESULT hr;
767
768 TRACE("%p, %s, %p, %u, %lx %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
769 lcid, rgDispId);
770
771 if(!rgszNames || cNames == 0 || !rgDispId)
772 return E_INVALIDARG;
773
775 if(SUCCEEDED(hr))
776 {
777 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
778 ITypeInfo_Release(typeinfo);
779 }
780
781 return hr;
782}
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
LCID lcid
Definition: locale.c:5656
@ IVBSAXAttributes_tid
Definition: msxml_dispex.h:64

◆ ivbsaxattributes_getIndexFromName()

static HRESULT WINAPI ivbsaxattributes_getIndexFromName ( IVBSAXAttributes *  iface,
BSTR  uri,
BSTR  localName,
int index 
)
static

Definition at line 889 of file saxreader.c.

894{
896 return ISAXAttributes_getIndexFromName(&This->ISAXAttributes_iface, uri, SysStringLen(uri),
897 localName, SysStringLen(localName), index);
898}

◆ ivbsaxattributes_getIndexFromQName()

static HRESULT WINAPI ivbsaxattributes_getIndexFromQName ( IVBSAXAttributes *  iface,
BSTR  QName,
int index 
)
static

Definition at line 900 of file saxreader.c.

904{
906 return ISAXAttributes_getIndexFromQName(&This->ISAXAttributes_iface, QName,
907 SysStringLen(QName), index);
908}

◆ ivbsaxattributes_getLocalName()

static HRESULT WINAPI ivbsaxattributes_getLocalName ( IVBSAXAttributes *  iface,
int  nIndex,
BSTR name 
)
static

Definition at line 843 of file saxreader.c.

847{
849 const WCHAR *nameW;
850 HRESULT hr;
851 int len;
852
853 TRACE("(%p)->(%d %p)\n", This, nIndex, name);
854
855 if (!name)
856 return E_POINTER;
857
858 *name = NULL;
859 hr = ISAXAttributes_getLocalName(&This->ISAXAttributes_iface, nIndex, &nameW, &len);
860 if (FAILED(hr))
861 return hr;
862
863 return return_bstrn(nameW, len, name);
864}
static const WCHAR nameW[]
Definition: main.c:49
static HRESULT return_bstrn(const WCHAR *value, int len, BSTR *p)
Definition: msxml_dispex.h:132

◆ ivbsaxattributes_getQName()

static HRESULT WINAPI ivbsaxattributes_getQName ( IVBSAXAttributes *  iface,
int  nIndex,
BSTR QName 
)
static

Definition at line 866 of file saxreader.c.

870{
872 const WCHAR *nameW;
873 HRESULT hr;
874 int len;
875
876 TRACE("(%p)->(%d %p)\n", This, nIndex, QName);
877
878 if (!QName)
879 return E_POINTER;
880
881 *QName = NULL;
882 hr = ISAXAttributes_getQName(&This->ISAXAttributes_iface, nIndex, &nameW, &len);
883 if (FAILED(hr))
884 return hr;
885
886 return return_bstrn(nameW, len, QName);
887}

◆ ivbsaxattributes_getType()

static HRESULT WINAPI ivbsaxattributes_getType ( IVBSAXAttributes *  iface,
int  nIndex,
BSTR type 
)
static

Definition at line 910 of file saxreader.c.

914{
916 const WCHAR *typeW;
917 HRESULT hr;
918 int len;
919
920 TRACE("(%p)->(%d %p)\n", This, nIndex, type);
921
922 if (!type)
923 return E_POINTER;
924
925 *type = NULL;
926 hr = ISAXAttributes_getType(&This->ISAXAttributes_iface, nIndex, &typeW, &len);
927 if (FAILED(hr))
928 return hr;
929
930 return return_bstrn(typeW, len, type);
931}
static const WCHAR typeW[]
Definition: name.c:51
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ ivbsaxattributes_getTypeFromName()

static HRESULT WINAPI ivbsaxattributes_getTypeFromName ( IVBSAXAttributes *  iface,
BSTR  uri,
BSTR  localName,
BSTR type 
)
static

Definition at line 933 of file saxreader.c.

938{
940 const WCHAR *typeW;
941 HRESULT hr;
942 int len;
943
944 TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(uri), debugstr_w(localName), type);
945
946 if (!type)
947 return E_POINTER;
948
949 *type = NULL;
950 hr = ISAXAttributes_getTypeFromName(&This->ISAXAttributes_iface, uri, SysStringLen(uri),
951 localName, SysStringLen(localName), &typeW, &len);
952 if (FAILED(hr))
953 return hr;
954
955 return return_bstrn(typeW, len, type);
956}

◆ ivbsaxattributes_getTypeFromQName()

static HRESULT WINAPI ivbsaxattributes_getTypeFromQName ( IVBSAXAttributes *  iface,
BSTR  QName,
BSTR type 
)
static

Definition at line 958 of file saxreader.c.

962{
964 const WCHAR *typeW;
965 HRESULT hr;
966 int len;
967
968 TRACE("(%p)->(%s %p)\n", This, debugstr_w(QName), type);
969
970 if (!type)
971 return E_POINTER;
972
973 *type = NULL;
974 hr = ISAXAttributes_getTypeFromQName(&This->ISAXAttributes_iface, QName, SysStringLen(QName),
975 &typeW, &len);
976 if (FAILED(hr))
977 return hr;
978
979 return return_bstrn(typeW, len, type);
980}

◆ ivbsaxattributes_GetTypeInfo()

static HRESULT WINAPI ivbsaxattributes_GetTypeInfo ( IVBSAXAttributes *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 748 of file saxreader.c.

751{
752 TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
753
754 return get_typeinfo(IVBSAXAttributes_tid, ppTInfo);
755}

◆ ivbsaxattributes_GetTypeInfoCount()

static HRESULT WINAPI ivbsaxattributes_GetTypeInfoCount ( IVBSAXAttributes *  iface,
UINT pctinfo 
)
static

Definition at line 737 of file saxreader.c.

738{
740
741 TRACE("(%p)->(%p)\n", This, pctinfo);
742
743 *pctinfo = 1;
744
745 return S_OK;
746}

◆ ivbsaxattributes_getURI()

static HRESULT WINAPI ivbsaxattributes_getURI ( IVBSAXAttributes *  iface,
int  nIndex,
BSTR uri 
)
static

Definition at line 820 of file saxreader.c.

824{
826 const WCHAR *uriW;
827 HRESULT hr;
828 int len;
829
830 TRACE("(%p)->(%d %p)\n", This, nIndex, uri);
831
832 if (!uri)
833 return E_POINTER;
834
835 *uri = NULL;
836 hr = ISAXAttributes_getURI(&This->ISAXAttributes_iface, nIndex, &uriW, &len);
837 if (FAILED(hr))
838 return hr;
839
840 return return_bstrn(uriW, len, uri);
841}

◆ ivbsaxattributes_getValue()

static HRESULT WINAPI ivbsaxattributes_getValue ( IVBSAXAttributes *  iface,
int  nIndex,
BSTR value 
)
static

Definition at line 982 of file saxreader.c.

986{
988 const WCHAR *valueW;
989 HRESULT hr;
990 int len;
991
992 TRACE("(%p)->(%d %p)\n", This, nIndex, value);
993
994 if (!value)
995 return E_POINTER;
996
997 *value = NULL;
998 hr = ISAXAttributes_getValue(&This->ISAXAttributes_iface, nIndex, &valueW, &len);
999 if (FAILED(hr))
1000 return hr;
1001
1002 return return_bstrn(valueW, len, value);
1003}
static const WCHAR valueW[]
Definition: object.c:48

◆ ivbsaxattributes_getValueFromName()

static HRESULT WINAPI ivbsaxattributes_getValueFromName ( IVBSAXAttributes *  iface,
BSTR  uri,
BSTR  localName,
BSTR value 
)
static

Definition at line 1005 of file saxreader.c.

1010{
1012 const WCHAR *valueW;
1013 HRESULT hr;
1014 int len;
1015
1016 TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(uri), debugstr_w(localName), value);
1017
1018 if (!value)
1019 return E_POINTER;
1020
1021 *value = NULL;
1022 hr = ISAXAttributes_getValueFromName(&This->ISAXAttributes_iface, uri, SysStringLen(uri),
1023 localName, SysStringLen(localName), &valueW, &len);
1024 if (FAILED(hr))
1025 return hr;
1026
1027 return return_bstrn(valueW, len, value);
1028}

◆ ivbsaxattributes_getValueFromQName()

static HRESULT WINAPI ivbsaxattributes_getValueFromQName ( IVBSAXAttributes *  iface,
BSTR  QName,
BSTR value 
)
static

Definition at line 1030 of file saxreader.c.

1034{
1036 const WCHAR *valueW;
1037 HRESULT hr;
1038 int len;
1039
1040 TRACE("(%p)->(%s %p)\n", This, debugstr_w(QName), value);
1041
1042 if (!value)
1043 return E_POINTER;
1044
1045 *value = NULL;
1046 hr = ISAXAttributes_getValueFromQName(&This->ISAXAttributes_iface, QName,
1047 SysStringLen(QName), &valueW, &len);
1048 if (FAILED(hr))
1049 return hr;
1050
1051 return return_bstrn(valueW, len, value);
1052}

◆ ivbsaxattributes_Invoke()

static HRESULT WINAPI ivbsaxattributes_Invoke ( IVBSAXAttributes *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 784 of file saxreader.c.

794{
796 HRESULT hr;
797
798 TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
799 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
800
802 if(SUCCEEDED(hr))
803 {
804 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
805 ITypeInfo_Release(typeinfo);
806 }
807
808 return hr;
809}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ ivbsaxattributes_QueryInterface()

static HRESULT WINAPI ivbsaxattributes_QueryInterface ( IVBSAXAttributes *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 715 of file saxreader.c.

719{
721 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
722 return IVBSAXLocator_QueryInterface(&This->IVBSAXLocator_iface, riid, ppvObject);
723}

◆ ivbsaxattributes_Release()

static ULONG WINAPI ivbsaxattributes_Release ( IVBSAXAttributes *  iface)
static

Definition at line 731 of file saxreader.c.

732{
734 return IVBSAXLocator_Release(&This->IVBSAXLocator_iface);
735}

◆ ivbsaxlocator_AddRef()

static ULONG WINAPI ivbsaxlocator_AddRef ( IVBSAXLocator *  iface)
static

Definition at line 2121 of file saxreader.c.

2122{
2124 TRACE("%p\n", This );
2125 return ISAXLocator_AddRef(&This->ISAXLocator_iface);
2126}
static saxlocator * impl_from_IVBSAXLocator(IVBSAXLocator *iface)
Definition: saxreader.c:331

◆ ivbsaxlocator_get_columnNumber()

static HRESULT WINAPI ivbsaxlocator_get_columnNumber ( IVBSAXLocator *  iface,
int pnColumn 
)
static

Definition at line 2210 of file saxreader.c.

2213{
2215 return ISAXLocator_getColumnNumber(&This->ISAXLocator_iface, pnColumn);
2216}

◆ ivbsaxlocator_get_lineNumber()

static HRESULT WINAPI ivbsaxlocator_get_lineNumber ( IVBSAXLocator *  iface,
int pnLine 
)
static

Definition at line 2218 of file saxreader.c.

2221{
2223 return ISAXLocator_getLineNumber(&This->ISAXLocator_iface, pnLine);
2224}

◆ ivbsaxlocator_get_publicId()

static HRESULT WINAPI ivbsaxlocator_get_publicId ( IVBSAXLocator *  iface,
BSTR ret 
)
static

Definition at line 2226 of file saxreader.c.

2227{
2229 const WCHAR *publicidW;
2230 HRESULT hr;
2231
2232 TRACE("(%p)->(%p)\n", This, ret);
2233
2234 if (!ret)
2235 return E_POINTER;
2236
2237 *ret = NULL;
2238 hr = ISAXLocator_getPublicId(&This->ISAXLocator_iface, &publicidW);
2239 if (FAILED(hr))
2240 return hr;
2241
2242 return return_bstr(publicidW, ret);
2243}
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
Definition: msxml_dispex.h:115

◆ ivbsaxlocator_get_systemId()

static HRESULT WINAPI ivbsaxlocator_get_systemId ( IVBSAXLocator *  iface,
BSTR ret 
)
static

Definition at line 2245 of file saxreader.c.

2246{
2248 const WCHAR *systemidW;
2249 HRESULT hr;
2250
2251 TRACE("(%p)->(%p)\n", This, ret);
2252
2253 if (!ret)
2254 return E_POINTER;
2255
2256 *ret = NULL;
2257 hr = ISAXLocator_getSystemId(&This->ISAXLocator_iface, &systemidW);
2258 if (FAILED(hr))
2259 return hr;
2260
2261 return return_bstr(systemidW, ret);
2262}

◆ ivbsaxlocator_GetIDsOfNames()

static HRESULT WINAPI ivbsaxlocator_GetIDsOfNames ( IVBSAXLocator *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 2155 of file saxreader.c.

2162{
2164 HRESULT hr;
2165
2166 TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
2167 lcid, rgDispId);
2168
2169 if(!rgszNames || cNames == 0 || !rgDispId)
2170 return E_INVALIDARG;
2171
2173 if(SUCCEEDED(hr))
2174 {
2175 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
2176 ITypeInfo_Release(typeinfo);
2177 }
2178
2179 return hr;
2180}
@ IVBSAXLocator_tid
Definition: msxml_dispex.h:71

◆ ivbsaxlocator_GetTypeInfo()

static HRESULT WINAPI ivbsaxlocator_GetTypeInfo ( IVBSAXLocator *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 2146 of file saxreader.c.

2149{
2150 TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
2151
2152 return get_typeinfo(IVBSAXLocator_tid, ppTInfo);
2153}

◆ ivbsaxlocator_GetTypeInfoCount()

static HRESULT WINAPI ivbsaxlocator_GetTypeInfoCount ( IVBSAXLocator *  iface,
UINT pctinfo 
)
static

Definition at line 2135 of file saxreader.c.

2136{
2138
2139 TRACE("(%p)->(%p)\n", This, pctinfo);
2140
2141 *pctinfo = 1;
2142
2143 return S_OK;
2144}

◆ ivbsaxlocator_Invoke()

static HRESULT WINAPI ivbsaxlocator_Invoke ( IVBSAXLocator *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 2182 of file saxreader.c.

2192{
2194 HRESULT hr;
2195
2196 TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
2197 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2198
2200 if(SUCCEEDED(hr))
2201 {
2202 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2203 ITypeInfo_Release(typeinfo);
2204 }
2205
2206 return hr;
2207}

◆ ivbsaxlocator_QueryInterface()

static HRESULT WINAPI ivbsaxlocator_QueryInterface ( IVBSAXLocator *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 2092 of file saxreader.c.

2093{
2095
2096 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject);
2097
2098 *ppvObject = NULL;
2099
2100 if ( IsEqualGUID( riid, &IID_IUnknown ) ||
2102 IsEqualGUID( riid, &IID_IVBSAXLocator ))
2103 {
2104 *ppvObject = iface;
2105 }
2106 else if ( IsEqualGUID( riid, &IID_IVBSAXAttributes ))
2107 {
2108 *ppvObject = &This->IVBSAXAttributes_iface;
2109 }
2110 else
2111 {
2112 FIXME("interface %s not implemented\n", debugstr_guid(riid));
2113 return E_NOINTERFACE;
2114 }
2115
2116 IVBSAXLocator_AddRef( iface );
2117
2118 return S_OK;
2119}
const GUID IID_IDispatch

◆ ivbsaxlocator_Release()

static ULONG WINAPI ivbsaxlocator_Release ( IVBSAXLocator *  iface)
static

Definition at line 2128 of file saxreader.c.

2129{
2131 return ISAXLocator_Release(&This->ISAXLocator_iface);
2132}

◆ libxml_cdatablock()

static void libxml_cdatablock ( void ctx,
const xmlChar value,
int  len 
)
static

Definition at line 2008 of file saxreader.c.

2009{
2010 const xmlChar *start, *end;
2012 struct saxlexicalhandler_iface *lexical = saxreader_get_lexicalhandler(locator->saxreader);
2013 HRESULT hr = S_OK;
2014 BSTR chars;
2015 int i;
2016
2019 {
2020 if (locator->vbInterface)
2021 hr = IVBSAXLexicalHandler_startCDATA(lexical->vbhandler);
2022 else
2023 hr = ISAXLexicalHandler_startCDATA(lexical->handler);
2024 }
2025
2026 if(FAILED(hr))
2027 {
2029 return;
2030 }
2031
2032 start = value;
2033 end = NULL;
2034 i = 0;
2035
2036 while (i < len)
2037 {
2038 /* scan for newlines */
2039 if (value[i] == '\r' || value[i] == '\n')
2040 {
2041 /* skip newlines/linefeeds */
2042 while (i < len)
2043 {
2044 if (value[i] != '\r' && value[i] != '\n') break;
2045 i++;
2046 }
2047 end = &value[i];
2048
2049 /* report */
2051 TRACE("(chunk %s)\n", debugstr_w(chars));
2053 SysFreeString(chars);
2054
2055 start = &value[i];
2056 end = NULL;
2057 }
2058 i++;
2059 locator->column++;
2060 }
2061
2062 /* no newline chars (or last chunk) report as a whole */
2063 if (!end && start == value)
2064 {
2065 /* report */
2067 TRACE("(%s)\n", debugstr_w(chars));
2069 SysFreeString(chars);
2070 }
2071
2073 {
2074 if (locator->vbInterface)
2075 hr = IVBSAXLexicalHandler_endCDATA(lexical->vbhandler);
2076 else
2077 hr = ISAXLexicalHandler_endCDATA(lexical->handler);
2078 }
2079
2080 if(FAILED(hr))
2082}
static BSTR saxreader_get_cdata_chunk(const xmlChar *str, int len)
Definition: saxreader.c:1973
static BSTR bstr_from_xmlCharN(const xmlChar *buf, int len)
Definition: saxreader.c:605
static void update_position(saxlocator *This, BOOL fix_column)
Definition: saxreader.c:696
static void format_error_message_from_id(saxlocator *This, HRESULT hr)
Definition: saxreader.c:667
static HRESULT saxreader_saxcharacters(saxlocator *locator, BSTR chars)
Definition: saxreader.c:357
static struct saxlexicalhandler_iface * saxreader_get_lexicalhandler(saxreader *reader)
Definition: saxreader.c:287
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
ISAXLexicalHandler * handler
Definition: saxreader.c:202
IVBSAXLexicalHandler * vbhandler
Definition: saxreader.c:203

Referenced by SAXXMLReader_create().

◆ libxmlCharacters()

static void libxmlCharacters ( void ctx,
const xmlChar ch,
int  len 
)
static

Definition at line 1771 of file saxreader.c.

1775{
1776 saxlocator *This = ctx;
1777 BSTR Chars;
1778 HRESULT hr;
1779 xmlChar *cur, *end;
1780 BOOL lastEvent = FALSE;
1781
1783
1785 cur = (xmlChar*)This->pParserCtxt->input->cur;
1786 while(cur>=This->pParserCtxt->input->base && *cur!='>')
1787 {
1788 if(*cur=='\n' || (*cur=='\r' && *(cur+1)!='\n'))
1789 This->line--;
1790 cur--;
1791 }
1792 This->column = 1;
1793 for(; cur>=This->pParserCtxt->input->base && *cur!='\n' && *cur!='\r'; cur--)
1794 This->column++;
1795
1796 cur = (xmlChar*)ch;
1797 if(*(ch-1)=='\r') cur--;
1798 end = cur;
1799
1800 while(1)
1801 {
1802 while(end-ch<len && *end!='\r') end++;
1803 if(end-ch==len)
1804 {
1805 lastEvent = TRUE;
1806 }
1807 else
1808 {
1809 *end = '\n';
1810 end++;
1811 }
1812
1813 if (This->saxreader->version >= MSXML4)
1814 {
1815 xmlChar *p;
1816
1817 for(p=cur; p!=end; p++)
1818 {
1819 if(*p=='\n')
1820 {
1821 This->line++;
1822 This->column = 1;
1823 }
1824 else
1825 {
1826 This->column++;
1827 }
1828 }
1829
1830 if(!lastEvent)
1831 This->column = 0;
1832 }
1833
1834 Chars = pooled_bstr_from_xmlCharN(&This->saxreader->pool, cur, end-cur);
1836
1838 {
1840 return;
1841 }
1842
1843 if (This->saxreader->version < MSXML4)
1844 This->column += end-cur;
1845
1846 if(lastEvent)
1847 break;
1848
1849 *(end-1) = '\r';
1850 if(*end == '\n')
1851 {
1852 end++;
1853 This->column++;
1854 }
1855 cur = end;
1856
1857 if(end-ch == len) break;
1858 }
1859}
unsigned char ch[4][2]
Definition: console.c:118
static BSTR pooled_bstr_from_xmlCharN(struct bstrpool *pool, const xmlChar *buf, int len)
Definition: saxreader.c:654
static BOOL sax_callback_failed(saxlocator *This, HRESULT hr)
Definition: saxreader.c:546
unsigned int BOOL
Definition: ntddk_ex.h:94
FxCollectionEntry * cur
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by SAXXMLReader_create().

◆ libxmlComment()

static void libxmlComment ( void ctx,
const xmlChar value 
)
static

Definition at line 1882 of file saxreader.c.

1883{
1884 saxlocator *This = ctx;
1886 BSTR bValue;
1887 HRESULT hr;
1888 const xmlChar *p = This->pParserCtxt->input->cur;
1889
1891 while(p-4>=This->pParserCtxt->input->base
1892 && memcmp(p-4, "<!--", sizeof(char[4])))
1893 {
1894 if(*p=='\n' || (*p=='\r' && *(p+1)!='\n'))
1895 This->line--;
1896 p--;
1897 }
1898
1899 This->column = 0;
1900 for(; p>=This->pParserCtxt->input->base && *p!='\n' && *p!='\r'; p--)
1901 This->column++;
1902
1904
1905 bValue = pooled_bstr_from_xmlChar(&This->saxreader->pool, value);
1906
1907 if (This->vbInterface)
1908 hr = IVBSAXLexicalHandler_comment(handler->vbhandler, &bValue);
1909 else
1910 hr = ISAXLexicalHandler_comment(handler->handler, bValue, SysStringLen(bValue));
1911
1912 if(FAILED(hr))
1914}
static BSTR pooled_bstr_from_xmlChar(struct bstrpool *pool, const xmlChar *buf)
Definition: saxreader.c:641
if(dx< 0)
Definition: linetemp.h:194

Referenced by SAXXMLReader_create().

◆ libxmlEndDocument()

static void libxmlEndDocument ( void ctx)
static

Definition at line 1562 of file saxreader.c.

1563{
1564 saxlocator *This = ctx;
1566 HRESULT hr;
1567
1568 if (This->saxreader->version >= MSXML4) {
1570 if(This->column > 1)
1571 This->line++;
1572 This->column = 0;
1573 } else {
1574 This->column = 0;
1575 This->line = 0;
1576 }
1577
1578 if(This->ret != S_OK) return;
1579
1581 {
1582 if(This->vbInterface)
1583 hr = IVBSAXContentHandler_endDocument(handler->vbhandler);
1584 else
1585 hr = ISAXContentHandler_endDocument(handler->handler);
1586
1589 }
1590}
static struct saxcontenthandler_iface * saxreader_get_contenthandler(saxreader *reader)
Definition: saxreader.c:277

Referenced by SAXXMLReader_create().

◆ libxmlEndElementNS()

static void libxmlEndElementNS ( void ctx,
const xmlChar localname,
const xmlChar prefix,
const xmlChar URI 
)
static

Definition at line 1671 of file saxreader.c.

1676{
1677 saxlocator *This = ctx;
1680 const xmlChar *p;
1681 BSTR uri, local;
1682 HRESULT hr;
1683
1685 p = This->pParserCtxt->input->cur;
1686
1687 if (This->saxreader->version >= MSXML4)
1688 {
1689 p--;
1690 while(p>This->pParserCtxt->input->base && *p!='>')
1691 {
1692 if(*p=='\n' || (*p=='\r' && *(p+1)!='\n'))
1693 This->line--;
1694 p--;
1695 }
1696 }
1697 else if(*(p-1)!='>' || *(p-2)!='/')
1698 {
1699 p--;
1700 while(p-2>=This->pParserCtxt->input->base
1701 && *(p-2)!='<' && *(p-1)!='/')
1702 {
1703 if(*p=='\n' || (*p=='\r' && *(p+1)!='\n'))
1704 This->line--;
1705 p--;
1706 }
1707 }
1708 This->column = 0;
1709 for(; p>=This->pParserCtxt->input->base && *p!='\n' && *p!='\r'; p--)
1710 This->column++;
1711
1712 uri = find_element_uri(This, URI);
1714
1716 {
1718 This->attr_count = 0;
1720 return;
1721 }
1722
1723 if (is_namespaces_enabled(This->saxreader))
1724 local = element->local;
1725 else
1726 uri = local = NULL;
1727
1728 if (This->vbInterface)
1729 hr = IVBSAXContentHandler_endElement(
1730 handler->vbhandler,
1731 &uri, &local, &element->qname);
1732 else
1733 hr = ISAXContentHandler_endElement(
1734 handler->handler,
1738
1740 This->attr_count = 0;
1741
1743 {
1746 return;
1747 }
1748
1749 if (is_namespaces_enabled(This->saxreader))
1750 {
1751 int i = -1;
1753 {
1754 if (This->vbInterface)
1755 hr = IVBSAXContentHandler_endPrefixMapping(
1756 handler->vbhandler, &element->ns[i].prefix);
1757 else
1758 hr = ISAXContentHandler_endPrefixMapping(
1759 handler->handler, element->ns[i].prefix, SysStringLen(element->ns[i].prefix));
1760
1761 if (sax_callback_failed(This, hr)) break;
1762 }
1763
1766 }
1767
1769}
static BSTR find_element_uri(saxlocator *locator, const xmlChar *uri)
Definition: saxreader.c:520
static BOOL iterate_endprefix_index(saxlocator *This, const element_entry *element, int *i)
Definition: saxreader.c:552
static const WCHAR empty_str
Definition: saxreader.c:146
static BOOL is_namespaces_enabled(const saxreader *reader)
Definition: saxreader.c:440
static element_entry * pop_element_ns(saxlocator *locator)
Definition: saxreader.c:510
static void free_attribute_values(saxlocator *locator)
Definition: saxreader.c:1429

Referenced by SAXXMLReader_create().

◆ libxmlFatalError()

static void WINAPIV libxmlFatalError ( void ctx,
const char msg,
  ... 
)
static

Definition at line 1916 of file saxreader.c.

1917{
1918 saxlocator *This = ctx;
1920 char message[1024];
1921 WCHAR *error;
1922 DWORD len;
1923 va_list args;
1924
1925 if(This->ret != S_OK) {
1926 xmlStopParser(This->pParserCtxt);
1927 return;
1928 }
1929
1930 va_start(args, msg);
1932 va_end(args);
1933
1935 error = malloc(sizeof(WCHAR) * len);
1936 if(error)
1937 {
1939 TRACE("fatal error for %p: %s\n", This, debugstr_w(error));
1940 }
1941
1943 {
1944 xmlStopParser(This->pParserCtxt);
1945 This->ret = E_FAIL;
1946 free(error);
1947 return;
1948 }
1949
1950 FIXME("Error handling is not compatible.\n");
1951
1952 if(This->vbInterface)
1953 {
1954 BSTR bstrError = SysAllocString(error);
1955 IVBSAXErrorHandler_fatalError(handler->vbhandler, &This->IVBSAXLocator_iface,
1956 &bstrError, E_FAIL);
1957 SysFreeString(bstrError);
1958 }
1959 else
1960 ISAXErrorHandler_fatalError(handler->handler, &This->ISAXLocator_iface, error, E_FAIL);
1961
1962 free(error);
1963
1964 xmlStopParser(This->pParserCtxt);
1965 This->ret = E_FAIL;
1966}
#define CP_UNIXCP
Definition: compat.h:79
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl vsprintf(char *, const char *, va_list) __WINE_CRT_PRINTF_ATTR(2
char * va_list
Definition: vadefs.h:50
#define error(str)
Definition: mkdosfs.c:1605
#define args
Definition: format.c:66
Definition: match.c:390
Definition: tftpd.h:60

Referenced by SAXXMLReader_create().

◆ libxmlresolveentity()

static xmlParserInputPtr libxmlresolveentity ( void ctx,
const xmlChar publicid,
const xmlChar systemid 
)
static

Definition at line 2084 of file saxreader.c.

2085{
2086 FIXME("entity resolving not implemented, %s, %s\n", publicid, systemid);
2087 return xmlSAX2ResolveEntity(ctx, publicid, systemid);
2088}
XMLPUBFUN xmlParserInputPtr xmlSAX2ResolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
Definition: SAX2.c:486

Referenced by SAXXMLReader_create().

◆ libxmlSetDocumentLocator()

static void libxmlSetDocumentLocator ( void ctx,
xmlSAXLocatorPtr  loc 
)
static

Definition at line 1861 of file saxreader.c.

1864{
1865 saxlocator *This = ctx;
1867 HRESULT hr = S_OK;
1868
1870 {
1871 if(This->vbInterface)
1872 hr = IVBSAXContentHandler_putref_documentLocator(handler->vbhandler,
1873 &This->IVBSAXLocator_iface);
1874 else
1875 hr = ISAXContentHandler_putDocumentLocator(handler->handler, &This->ISAXLocator_iface);
1876 }
1877
1878 if(FAILED(hr))
1880}

Referenced by SAXXMLReader_create().

◆ libxmlStartDocument()

static void libxmlStartDocument ( void ctx)
static

Definition at line 1522 of file saxreader.c.

1523{
1524 saxlocator *This = ctx;
1526 HRESULT hr;
1527
1528 if (This->saxreader->version >= MSXML4)
1529 {
1530 const xmlChar *p = This->pParserCtxt->input->cur-1;
1532 while(p>This->pParserCtxt->input->base && *p!='>')
1533 {
1534 if(*p=='\n' || (*p=='\r' && *(p+1)!='\n'))
1535 This->line--;
1536 p--;
1537 }
1538 This->column = 0;
1539 for(; p>=This->pParserCtxt->input->base && *p!='\n' && *p!='\r'; p--)
1540 This->column++;
1541 }
1542
1543 /* store version value, declaration has to contain version attribute */
1544 if (This->pParserCtxt->standalone != -1)
1545 {
1546 SysFreeString(This->saxreader->xmldecl_version);
1547 This->saxreader->xmldecl_version = bstr_from_xmlChar(This->pParserCtxt->version);
1548 }
1549
1551 {
1552 if(This->vbInterface)
1553 hr = IVBSAXContentHandler_startDocument(handler->vbhandler);
1554 else
1555 hr = ISAXContentHandler_startDocument(handler->handler);
1556
1559 }
1560}

Referenced by SAXXMLReader_create().

◆ libxmlStartElementNS()

static void libxmlStartElementNS ( void ctx,
const xmlChar localname,
const xmlChar prefix,
const xmlChar URI,
int  nb_namespaces,
const xmlChar **  namespaces,
int  nb_attributes,
int  nb_defaulted,
const xmlChar **  attributes 
)
static

Definition at line 1592 of file saxreader.c.

1602{
1603 saxlocator *This = ctx;
1606 HRESULT hr = S_OK;
1607 BSTR uri;
1608
1610 if(*(This->pParserCtxt->input->cur) == '/')
1611 This->column++;
1612 if(This->saxreader->version < MSXML4)
1613 This->column++;
1614
1615 element = alloc_element_entry(localname, prefix, nb_namespaces, namespaces);
1617
1618 if (is_namespaces_enabled(This->saxreader))
1619 {
1620 int i;
1621
1622 for (i = 0; i < nb_namespaces && saxreader_has_handler(This, SAXContentHandler); i++)
1623 {
1624 if (This->vbInterface)
1625 hr = IVBSAXContentHandler_startPrefixMapping(
1626 handler->vbhandler,
1627 &element->ns[i].prefix,
1628 &element->ns[i].uri);
1629 else
1630 hr = ISAXContentHandler_startPrefixMapping(
1631 handler->handler,
1632 element->ns[i].prefix,
1633 SysStringLen(element->ns[i].prefix),
1634 element->ns[i].uri,
1635 SysStringLen(element->ns[i].uri));
1636
1638 {
1640 return;
1641 }
1642 }
1643 }
1644
1645 uri = find_element_uri(This, URI);
1646 hr = SAXAttributes_populate(This, nb_namespaces, namespaces, nb_attributes, attributes);
1648 {
1649 BSTR local;
1650
1651 if (is_namespaces_enabled(This->saxreader))
1652 local = element->local;
1653 else
1654 uri = local = NULL;
1655
1656 if (This->vbInterface)
1657 hr = IVBSAXContentHandler_startElement(handler->vbhandler,
1658 &uri, &local, &element->qname, &This->IVBSAXAttributes_iface);
1659 else
1660 hr = ISAXContentHandler_startElement(handler->handler,
1664 &This->ISAXAttributes_iface);
1665
1668 }
1669}
static HRESULT SAXAttributes_populate(saxlocator *locator, int nb_namespaces, const xmlChar **xmlNamespaces, int nb_attributes, const xmlChar **xmlAttributes)
Definition: saxreader.c:1446
static element_entry * alloc_element_entry(const xmlChar *local, const xmlChar *prefix, int nb_ns, const xmlChar **namespaces)
Definition: saxreader.c:463
static void push_element_ns(saxlocator *locator, element_entry *element)
Definition: saxreader.c:505

Referenced by SAXXMLReader_create().

◆ pooled_bstr_from_xmlChar()

static BSTR pooled_bstr_from_xmlChar ( struct bstrpool pool,
const xmlChar buf 
)
static

Definition at line 641 of file saxreader.c.

642{
643 BSTR pool_entry = bstr_from_xmlChar(buf);
644
645 if (pool_entry && !bstr_pool_insert(pool, pool_entry))
646 {
647 SysFreeString(pool_entry);
648 return NULL;
649 }
650
651 return pool_entry;
652}
static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry)
Definition: saxreader.c:566

Referenced by libxmlComment().

◆ pooled_bstr_from_xmlCharN()

static BSTR pooled_bstr_from_xmlCharN ( struct bstrpool pool,
const xmlChar buf,
int  len 
)
static

Definition at line 654 of file saxreader.c.

655{
656 BSTR pool_entry = bstr_from_xmlCharN(buf, len);
657
658 if (pool_entry && !bstr_pool_insert(pool, pool_entry))
659 {
660 SysFreeString(pool_entry);
661 return NULL;
662 }
663
664 return pool_entry;
665}

Referenced by libxmlCharacters().

◆ pop_element_ns()

static element_entry * pop_element_ns ( saxlocator locator)
static

Definition at line 510 of file saxreader.c.

511{
513
514 if (element)
516
517 return element;
518}
Definition: list.h:15
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by libxmlEndElementNS().

◆ push_element_ns()

static void push_element_ns ( saxlocator locator,
element_entry element 
)
static

Definition at line 505 of file saxreader.c.

506{
507 list_add_head(&locator->elements, &element->entry);
508}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76

Referenced by libxmlStartElementNS().

◆ QName_from_xmlChar()

static BSTR QName_from_xmlChar ( const xmlChar prefix,
const xmlChar name 
)
static

Definition at line 624 of file saxreader.c.

625{
626 xmlChar *qname;
627 BSTR bstr;
628
629 if(!name) return NULL;
630
631 if(!prefix || !*prefix)
632 return bstr_from_xmlChar(name);
633
634 qname = xmlBuildQName(name, prefix, NULL, 0);
635 bstr = bstr_from_xmlChar(qname);
636 xmlFree(qname);
637
638 return bstr;
639}

Referenced by SAXAttributes_populate().

◆ sax_callback_failed()

static BOOL sax_callback_failed ( saxlocator This,
HRESULT  hr 
)
inlinestatic

Definition at line 546 of file saxreader.c.

547{
548 return This->saxreader->version >= MSXML4 ? FAILED(hr) : hr != S_OK;
549}

Referenced by libxmlCharacters(), libxmlEndDocument(), libxmlEndElementNS(), libxmlStartDocument(), and libxmlStartElementNS().

◆ SAXAttributes_populate()

static HRESULT SAXAttributes_populate ( saxlocator locator,
int  nb_namespaces,
const xmlChar **  xmlNamespaces,
int  nb_attributes,
const xmlChar **  xmlAttributes 
)
static

Definition at line 1446 of file saxreader.c.

1449{
1450 static const xmlChar xmlns[] = "xmlns";
1451 static const WCHAR xmlnsW[] = { 'x','m','l','n','s',0 };
1452
1453 struct _attributes *attrs;
1454 int i;
1455
1456 /* skip namespace definitions */
1457 if ((locator->saxreader->features & NamespacePrefixes) == 0)
1458 nb_namespaces = 0;
1459
1460 locator->attr_count = nb_namespaces + nb_attributes;
1461 if(locator->attr_count > locator->attr_alloc_count)
1462 {
1463 int new_size = locator->attr_count * 2;
1464 attrs = realloc(locator->attributes, new_size * sizeof(*locator->attributes));
1465 if(!attrs)
1466 {
1468 locator->attr_count = 0;
1469 return E_OUTOFMEMORY;
1470 }
1471 memset(attrs + locator->attr_alloc_count, 0,
1472 (new_size - locator->attr_alloc_count) * sizeof(*locator->attributes));
1473 locator->attributes = attrs;
1474 locator->attr_alloc_count = new_size;
1475 }
1476 else
1477 {
1478 attrs = locator->attributes;
1479 }
1480
1481 for (i = 0; i < nb_namespaces; i++)
1482 {
1483 SysFreeString(attrs[nb_attributes+i].szLocalname);
1484 attrs[nb_attributes+i].szLocalname = SysAllocStringLen(NULL, 0);
1485
1486 attrs[nb_attributes+i].szURI = locator->namespaceUri;
1487
1488 SysFreeString(attrs[nb_attributes+i].szValue);
1489 attrs[nb_attributes+i].szValue = bstr_from_xmlChar(xmlNamespaces[2*i+1]);
1490
1491 SysFreeString(attrs[nb_attributes+i].szQName);
1492 if(!xmlNamespaces[2*i])
1493 attrs[nb_attributes+i].szQName = SysAllocString(xmlnsW);
1494 else
1495 attrs[nb_attributes+i].szQName = QName_from_xmlChar(xmlns, xmlNamespaces[2*i]);
1496 }
1497
1498 for (i = 0; i < nb_attributes; i++)
1499 {
1500 static const xmlChar xmlA[] = "xml";
1501
1502 if (xmlStrEqual(xmlAttributes[i*5+1], xmlA))
1503 attrs[i].szURI = bstr_from_xmlChar(xmlAttributes[i*5+2]);
1504 else
1505 /* that's an important feature to keep same uri pointer for every reported attribute */
1506 attrs[i].szURI = find_element_uri(locator, xmlAttributes[i*5+2]);
1507
1508 SysFreeString(attrs[i].szLocalname);
1509 attrs[i].szLocalname = bstr_from_xmlChar(xmlAttributes[i*5]);
1510
1511 SysFreeString(attrs[i].szValue);
1512 attrs[i].szValue = saxreader_get_unescaped_value(xmlAttributes[i*5+3], xmlAttributes[i*5+4]-xmlAttributes[i*5+3]);
1513
1514 SysFreeString(attrs[i].szQName);
1515 attrs[i].szQName = QName_from_xmlChar(xmlAttributes[i*5+1], xmlAttributes[i*5]);
1516 }
1517
1518 return S_OK;
1519}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const xmlChar xmlns[]
Definition: attribute.c:40
static BSTR saxreader_get_unescaped_value(const xmlChar *buf, int len)
Definition: saxreader.c:1389
static BSTR QName_from_xmlChar(const xmlChar *prefix, const xmlChar *name)
Definition: saxreader.c:624
static WCHAR xmlnsW[]
Definition: reader.c:228
size_t const new_size
Definition: expand.cpp:66
#define memset(x, y, z)
Definition: compat.h:39
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162

Referenced by libxmlStartElementNS().

◆ SAXLocator_create()

static HRESULT SAXLocator_create ( saxreader reader,
saxlocator **  ppsaxlocator,
BOOL  vbInterface 
)
static

Definition at line 2432 of file saxreader.c.

2433{
2434 static const WCHAR w3xmlns[] = { 'h','t','t','p',':','/','/', 'w','w','w','.','w','3','.',
2435 'o','r','g','/','2','0','0','0','/','x','m','l','n','s','/',0 };
2436
2438
2439 locator = malloc(sizeof(*locator));
2440 if( !locator )
2441 return E_OUTOFMEMORY;
2442
2443 locator->IVBSAXLocator_iface.lpVtbl = &VBSAXLocatorVtbl;
2444 locator->ISAXLocator_iface.lpVtbl = &SAXLocatorVtbl;
2445 locator->IVBSAXAttributes_iface.lpVtbl = &ivbsaxattributes_vtbl;
2446 locator->ISAXAttributes_iface.lpVtbl = &isaxattributes_vtbl;
2447 locator->ref = 1;
2448 locator->vbInterface = vbInterface;
2449
2450 locator->saxreader = reader;
2451 ISAXXMLReader_AddRef(&reader->ISAXXMLReader_iface);
2452
2453 locator->pParserCtxt = NULL;
2454 locator->publicId = NULL;
2455 locator->systemId = NULL;
2456 locator->line = reader->version < MSXML4 ? 0 : 1;
2457 locator->column = 0;
2458 locator->ret = S_OK;
2459 if (locator->saxreader->version >= MSXML6)
2460 locator->namespaceUri = SysAllocString(w3xmlns);
2461 else
2462 locator->namespaceUri = SysAllocStringLen(NULL, 0);
2463 if(!locator->namespaceUri)
2464 {
2465 ISAXXMLReader_Release(&reader->ISAXXMLReader_iface);
2466 free(locator);
2467 return E_OUTOFMEMORY;
2468 }
2469
2470 locator->attr_alloc_count = 8;
2471 locator->attr_count = 0;
2472 locator->attributes = calloc(locator->attr_alloc_count, sizeof(*locator->attributes));
2473 if(!locator->attributes)
2474 {
2475 ISAXXMLReader_Release(&reader->ISAXXMLReader_iface);
2476 SysFreeString(locator->namespaceUri);
2477 free(locator);
2478 return E_OUTOFMEMORY;
2479 }
2480
2481 list_init(&locator->elements);
2482
2483 *ppsaxlocator = locator;
2484
2485 TRACE("returning %p\n", *ppsaxlocator);
2486
2487 return S_OK;
2488}
static void list_init(struct list_entry *head)
Definition: list.h:51
static const struct ISAXLocatorVtbl SAXLocatorVtbl
Definition: saxreader.c:2421
static const struct IVBSAXLocatorVtbl VBSAXLocatorVtbl
Definition: saxreader.c:2264
static const struct IVBSAXAttributesVtbl ivbsaxattributes_vtbl
Definition: saxreader.c:1054
static const struct ISAXAttributesVtbl isaxattributes_vtbl
Definition: saxreader.c:1366
@ MSXML6
Definition: msxml_dispex.h:33
#define calloc
Definition: rosglue.h:14

Referenced by internal_parseBuffer(), and internal_parseStream().

◆ saxreader_get_cdata_chunk()

static BSTR saxreader_get_cdata_chunk ( const xmlChar str,
int  len 
)
static

Definition at line 1973 of file saxreader.c.

1974{
1975 BSTR bstr = bstr_from_xmlCharN(str, len), ret;
1976 WCHAR *ptr;
1977
1978 len = SysStringLen(bstr);
1979 ptr = bstr + len - 1;
1980 while ((*ptr == '\r' || *ptr == '\n') && ptr >= bstr)
1981 ptr--;
1982
1983 while (*++ptr)
1984 {
1985 /* replace returns as:
1986
1987 - "\r<char>" -> "\n<char>"
1988 - "\r\r" -> "\r"
1989 - "\r\n" -> "\n"
1990 */
1991 if (*ptr == '\r')
1992 {
1993 if (*(ptr+1) == '\r' || *(ptr+1) == '\n')
1994 {
1995 /* shift tail */
1996 memmove(ptr, ptr+1, len-- - (ptr-bstr));
1997 }
1998 else
1999 *ptr = '\n';
2000 }
2001 }
2002
2003 ret = SysAllocStringLen(bstr, len);
2004 SysFreeString(bstr);
2005 return ret;
2006}
#define memmove(s1, s2, n)
Definition: mkisofs.h:881

Referenced by libxml_cdatablock().

◆ saxreader_get_contenthandler()

static struct saxcontenthandler_iface * saxreader_get_contenthandler ( saxreader reader)
static

◆ saxreader_get_errorhandler()

static struct saxerrorhandler_iface * saxreader_get_errorhandler ( saxreader reader)
static

Definition at line 282 of file saxreader.c.

283{
284 return &reader->saxhandlers[SAXErrorHandler].u.error;
285}

Referenced by format_error_message_from_id(), and libxmlFatalError().

◆ saxreader_get_handler()

static HRESULT saxreader_get_handler ( const saxreader reader,
enum saxhandler_type  type,
BOOL  vb,
void **  ret 
)
static

Definition at line 258 of file saxreader.c.

259{
260 const struct saxanyhandler_iface *iface = &reader->saxhandlers[type].u.anyhandler;
261
262 if (!ret) return E_POINTER;
263
264 if ((vb && iface->vbhandler) || (!vb && iface->handler))
265 {
266 if (vb)
267 IUnknown_AddRef(iface->vbhandler);
268 else
269 IUnknown_AddRef(iface->handler);
270 }
271
272 *ret = vb ? iface->vbhandler : iface->handler;
273
274 return S_OK;
275}
IUnknown * vbhandler
Definition: saxreader.c:185
IUnknown * handler
Definition: saxreader.c:184

Referenced by internal_getProperty(), isaxxmlreader_getContentHandler(), isaxxmlreader_getDTDHandler(), isaxxmlreader_getEntityResolver(), isaxxmlreader_getErrorHandler(), saxxmlreader_get_contentHandler(), saxxmlreader_get_dtdHandler(), saxxmlreader_get_entityResolver(), and saxxmlreader_get_errorHandler().

◆ saxreader_get_lexicalhandler()

static struct saxlexicalhandler_iface * saxreader_get_lexicalhandler ( saxreader reader)
static

Definition at line 287 of file saxreader.c.

288{
289 return &reader->saxhandlers[SAXLexicalHandler].u.lexical;
290}

Referenced by libxml_cdatablock(), and libxmlComment().

◆ saxreader_get_unescaped_value()

static BSTR saxreader_get_unescaped_value ( const xmlChar buf,
int  len 
)
static

Definition at line 1389 of file saxreader.c.

1390{
1391 static const WCHAR ampescW[] = {'&','#','3','8',';',0};
1392 WCHAR *dest, *ptrW, *str;
1393 DWORD str_len;
1394 BSTR bstr;
1395
1396 if (!buf)
1397 return NULL;
1398
1400 if (len != -1) str_len++;
1401
1402 str = malloc(str_len * sizeof(WCHAR));
1403 if (!str) return NULL;
1404
1406 if (len != -1) str[str_len-1] = 0;
1407
1408 ptrW = str;
1409 while ((dest = wcsstr(ptrW, ampescW)))
1410 {
1411 WCHAR *src;
1412
1413 /* leave first '&' from a reference as a value */
1414 src = dest + ARRAY_SIZE(ampescW) - 1;
1415 dest++;
1416
1417 /* move together with null terminator */
1418 memmove(dest, src, (lstrlenW(src) + 1)*sizeof(WCHAR));
1419
1420 ptrW++;
1421 }
1422
1423 bstr = SysAllocString(str);
1424 free(str);
1425
1426 return bstr;
1427}
_ACRTIMP wchar_t *__cdecl wcsstr(const wchar_t *, const wchar_t *)
Definition: wcs.c:2993
GLenum src
Definition: glext.h:6340
static char * dest
Definition: rtl.c:135
#define str_len
Definition: treelist.c:89

Referenced by SAXAttributes_populate().

◆ saxreader_has_handler()

static BOOL saxreader_has_handler ( const saxlocator locator,
enum saxhandler_type  type 
)
inlinestatic

Definition at line 351 of file saxreader.c.

352{
353 struct saxanyhandler_iface *iface = &locator->saxreader->saxhandlers[type].u.anyhandler;
354 return (locator->vbInterface && iface->vbhandler) || (!locator->vbInterface && iface->handler);
355}

Referenced by format_error_message_from_id(), libxml_cdatablock(), libxmlCharacters(), libxmlComment(), libxmlEndDocument(), libxmlEndElementNS(), libxmlFatalError(), libxmlSetDocumentLocator(), libxmlStartDocument(), libxmlStartElementNS(), and saxreader_saxcharacters().

◆ saxreader_put_handler()

static HRESULT saxreader_put_handler ( saxreader reader,
enum saxhandler_type  type,
void ptr,
BOOL  vb 
)
static

Definition at line 239 of file saxreader.c.

240{
241 struct saxanyhandler_iface *iface = &reader->saxhandlers[type].u.anyhandler;
242 IUnknown *unk = (IUnknown*)ptr;
243
244 if (unk)
245 IUnknown_AddRef(unk);
246
247 if ((vb && iface->vbhandler) || (!vb && iface->handler))
248 IUnknown_Release(vb ? iface->vbhandler : iface->handler);
249
250 if (vb)
251 iface->vbhandler = unk;
252 else
253 iface->handler = unk;
254
255 return S_OK;
256}

Referenced by isaxxmlreader_putContentHandler(), isaxxmlreader_putDTDHandler(), isaxxmlreader_putEntityResolver(), isaxxmlreader_putErrorHandler(), saxreader_put_handler_from_variant(), saxxmlreader_put_contentHandler(), saxxmlreader_put_dtdHandler(), saxxmlreader_put_entityResolver(), and saxxmlreader_put_errorHandler().

◆ saxreader_put_handler_from_variant()

static HRESULT saxreader_put_handler_from_variant ( saxreader This,
enum saxhandler_type  type,
const VARIANT v,
BOOL  vb 
)
static

Definition at line 2739 of file saxreader.c.

2740{
2741 const IID *riid;
2742
2743 if (V_VT(v) == VT_EMPTY)
2744 return saxreader_put_handler(This, type, NULL, vb);
2745
2746 switch (type)
2747 {
2748 case SAXDeclHandler:
2749 riid = vb ? &IID_IVBSAXDeclHandler : &IID_ISAXDeclHandler;
2750 break;
2751 case SAXLexicalHandler:
2752 riid = vb ? &IID_IVBSAXLexicalHandler : &IID_ISAXLexicalHandler;
2753 break;
2754 default:
2755 ERR("wrong handler type %d\n", type);
2756 return E_FAIL;
2757 }
2758
2759 switch (V_VT(v))
2760 {
2761 case VT_DISPATCH:
2762 case VT_UNKNOWN:
2763 {
2765
2766 if (V_UNKNOWN(v))
2767 {
2768 HRESULT hr = IUnknown_QueryInterface(V_UNKNOWN(v), riid, (void**)&handler);
2769 if (FAILED(hr)) return hr;
2770 }
2771
2773 if (handler) IUnknown_Release(handler);
2774 break;
2775 }
2776 default:
2777 ERR("value type %d not supported\n", V_VT(v));
2778 return E_INVALIDARG;
2779 }
2780
2781 return S_OK;
2782}
@ VT_EMPTY
Definition: compat.h:2295

Referenced by internal_putProperty().

◆ saxreader_saxcharacters()

static HRESULT saxreader_saxcharacters ( saxlocator locator,
BSTR  chars 
)
static

Definition at line 357 of file saxreader.c.

358{
360 HRESULT hr;
361
363
364 if (locator->vbInterface)
365 hr = IVBSAXContentHandler_characters(content->vbhandler, &chars);
366 else
367 hr = ISAXContentHandler_characters(content->handler, chars, SysStringLen(chars));
368
369 return hr;
370}
content
Definition: atl_ax.c:994

Referenced by libxml_cdatablock(), and libxmlCharacters().

◆ saxxmlreader_AddRef()

static ULONG WINAPI saxxmlreader_AddRef ( IVBSAXXMLReader *  iface)
static

Definition at line 2910 of file saxreader.c.

2911{
2913 TRACE("%p\n", This );
2914 return InterlockedIncrement( &This->ref );
2915}
static saxreader * impl_from_IVBSAXXMLReader(IVBSAXXMLReader *iface)
Definition: saxreader.c:321

◆ SAXXMLReader_create()

HRESULT SAXXMLReader_create ( MSXML_VERSION  version,
LPVOID ppObj 
)

Definition at line 3427 of file saxreader.c.

3428{
3430
3431 TRACE("(%p)\n", ppObj);
3432
3433 reader = malloc(sizeof(*reader));
3434 if( !reader )
3435 return E_OUTOFMEMORY;
3436
3437 reader->IVBSAXXMLReader_iface.lpVtbl = &VBSAXXMLReaderVtbl;
3438 reader->ISAXXMLReader_iface.lpVtbl = &SAXXMLReaderVtbl;
3439 reader->ref = 1;
3440 memset(reader->saxhandlers, 0, sizeof(reader->saxhandlers));
3441 reader->isParsing = FALSE;
3442 reader->xmldecl_version = NULL;
3443 reader->pool.pool = NULL;
3444 reader->pool.index = 0;
3445 reader->pool.len = 0;
3446 reader->features = Namespaces | NamespacePrefixes;
3447 reader->version = version;
3448
3449 init_dispex(&reader->dispex, (IUnknown*)&reader->IVBSAXXMLReader_iface, &saxreader_dispex);
3450
3451 memset(&reader->sax, 0, sizeof(xmlSAXHandler));
3452 reader->sax.initialized = XML_SAX2_MAGIC;
3453 reader->sax.startDocument = libxmlStartDocument;
3454 reader->sax.endDocument = libxmlEndDocument;
3455 reader->sax.startElementNs = libxmlStartElementNS;
3456 reader->sax.endElementNs = libxmlEndElementNS;
3457 reader->sax.characters = libxmlCharacters;
3458 reader->sax.setDocumentLocator = libxmlSetDocumentLocator;
3459 reader->sax.comment = libxmlComment;
3460 reader->sax.error = libxmlFatalError;
3461 reader->sax.fatalError = libxmlFatalError;
3462 reader->sax.cdataBlock = libxml_cdatablock;
3463 reader->sax.resolveEntity = libxmlresolveentity;
3464
3465 *ppObj = &reader->IVBSAXXMLReader_iface;
3466
3467 TRACE("returning iface %p\n", *ppObj);
3468
3469 return S_OK;
3470}
static const WCHAR version[]
Definition: asmname.c:66
static void libxmlCharacters(void *ctx, const xmlChar *ch, int len)
Definition: saxreader.c:1771
static const struct IVBSAXXMLReaderVtbl VBSAXXMLReaderVtbl
Definition: saxreader.c:3147
static void libxml_cdatablock(void *ctx, const xmlChar *value, int len)
Definition: saxreader.c:2008
static dispex_static_data_t saxreader_dispex
Definition: saxreader.c:3420
static void libxmlEndDocument(void *ctx)
Definition: saxreader.c:1562
static void libxmlComment(void *ctx, const xmlChar *value)
Definition: saxreader.c:1882
static void libxmlEndElementNS(void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI)
Definition: saxreader.c:1671
static void WINAPIV libxmlFatalError(void *ctx, const char *msg,...)
Definition: saxreader.c:1916
static void libxmlStartElementNS(void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes)
Definition: saxreader.c:1592
static const struct ISAXXMLReaderVtbl SAXXMLReaderVtbl
Definition: saxreader.c:3391
static xmlParserInputPtr libxmlresolveentity(void *ctx, const xmlChar *publicid, const xmlChar *systemid)
Definition: saxreader.c:2084
static void libxmlStartDocument(void *ctx)
Definition: saxreader.c:1522
static void libxmlSetDocumentLocator(void *ctx, xmlSAXLocatorPtr loc)
Definition: saxreader.c:1861
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
#define XML_SAX2_MAGIC
Definition: parser.h:687

◆ saxxmlreader_get_baseURL()

static HRESULT WINAPI saxxmlreader_get_baseURL ( IVBSAXXMLReader *  iface,
BSTR pBaseUrl 
)
static

Definition at line 3095 of file saxreader.c.

3098{
3100
3101 FIXME("(%p)->(%p) stub\n", This, pBaseUrl);
3102 return E_NOTIMPL;
3103}

◆ saxxmlreader_get_contentHandler()

static HRESULT WINAPI saxxmlreader_get_contentHandler ( IVBSAXXMLReader *  iface,
IVBSAXContentHandler **  handler 
)
static

Definition at line 3047 of file saxreader.c.

3050{
3053}

◆ saxxmlreader_get_dtdHandler()

static HRESULT WINAPI saxxmlreader_get_dtdHandler ( IVBSAXXMLReader *  iface,
IVBSAXDTDHandler **  handler 
)
static

Definition at line 3063 of file saxreader.c.

3066{
3069}

◆ saxxmlreader_get_entityResolver()

static HRESULT WINAPI saxxmlreader_get_entityResolver ( IVBSAXXMLReader *  iface,
IVBSAXEntityResolver **  resolver 
)
static

Definition at line 3031 of file saxreader.c.

3034{
3036 return saxreader_get_handler(This, SAXEntityResolver, TRUE, (void**)resolver);
3037}

◆ saxxmlreader_get_errorHandler()

static HRESULT WINAPI saxxmlreader_get_errorHandler ( IVBSAXXMLReader *  iface,
IVBSAXErrorHandler **  handler 
)
static

Definition at line 3079 of file saxreader.c.

3082{
3085}

◆ saxxmlreader_get_secureBaseURL()

static HRESULT WINAPI saxxmlreader_get_secureBaseURL ( IVBSAXXMLReader *  iface,
BSTR pSecureBaseUrl 
)
static

Definition at line 3113 of file saxreader.c.

3116{
3118
3119 FIXME("(%p)->(%p) stub\n", This, pSecureBaseUrl);
3120 return E_NOTIMPL;
3121}

◆ saxxmlreader_getFeature()

static HRESULT WINAPI saxxmlreader_getFeature ( IVBSAXXMLReader *  iface,
BSTR  feature_name,
VARIANT_BOOL value 
)
static

Definition at line 2995 of file saxreader.c.

2999{
3001 return ISAXXMLReader_getFeature(&This->ISAXXMLReader_iface, feature_name, value);
3002}

◆ saxxmlreader_GetIDsOfNames()

static HRESULT WINAPI saxxmlreader_GetIDsOfNames ( IVBSAXXMLReader *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 2965 of file saxreader.c.

2972{
2974 return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
2975 riid, rgszNames, cNames, lcid, rgDispId);
2976}

◆ saxxmlreader_getProperty()

static HRESULT WINAPI saxxmlreader_getProperty ( IVBSAXXMLReader *  iface,
BSTR  prop,
VARIANT value 
)
static

Definition at line 3013 of file saxreader.c.

3017{
3019 return internal_getProperty(This, prop, value, TRUE);
3020}

◆ saxxmlreader_GetTypeInfo()

static HRESULT WINAPI saxxmlreader_GetTypeInfo ( IVBSAXXMLReader *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 2956 of file saxreader.c.

2959{
2961 return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
2962 iTInfo, lcid, ppTInfo);
2963}

◆ saxxmlreader_GetTypeInfoCount()

static HRESULT WINAPI saxxmlreader_GetTypeInfoCount ( IVBSAXXMLReader *  iface,
UINT pctinfo 
)
static

Definition at line 2950 of file saxreader.c.

2951{
2953 return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
2954}

◆ saxxmlreader_Invoke()

static HRESULT WINAPI saxxmlreader_Invoke ( IVBSAXXMLReader *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 2978 of file saxreader.c.

2988{
2990 return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
2991 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
2992}

◆ saxxmlreader_parse()

static HRESULT WINAPI saxxmlreader_parse ( IVBSAXXMLReader *  iface,
VARIANT  varInput 
)
static

Definition at line 3131 of file saxreader.c.

3134{
3136 return internal_parse(This, varInput, TRUE);
3137}

◆ saxxmlreader_parseURL()

static HRESULT WINAPI saxxmlreader_parseURL ( IVBSAXXMLReader *  iface,
BSTR  url 
)
static

Definition at line 3139 of file saxreader.c.

3142{
3144 return internal_parseURL(This, url, TRUE);
3145}

◆ saxxmlreader_put_baseURL()

static HRESULT WINAPI saxxmlreader_put_baseURL ( IVBSAXXMLReader *  iface,
BSTR  pBaseUrl 
)
static

Definition at line 3105 of file saxreader.c.

3108{
3110 return ISAXXMLReader_putBaseURL(&This->ISAXXMLReader_iface, pBaseUrl);
3111}

◆ saxxmlreader_put_contentHandler()

static HRESULT WINAPI saxxmlreader_put_contentHandler ( IVBSAXXMLReader *  iface,
IVBSAXContentHandler *  handler 
)
static

Definition at line 3055 of file saxreader.c.

◆ saxxmlreader_put_dtdHandler()

static HRESULT WINAPI saxxmlreader_put_dtdHandler ( IVBSAXXMLReader *  iface,
IVBSAXDTDHandler *  handler 
)
static

Definition at line 3071 of file saxreader.c.

◆ saxxmlreader_put_entityResolver()

static HRESULT WINAPI saxxmlreader_put_entityResolver ( IVBSAXXMLReader *  iface,
IVBSAXEntityResolver *  resolver 
)
static

Definition at line 3039 of file saxreader.c.

3042{
3045}

◆ saxxmlreader_put_errorHandler()

static HRESULT WINAPI saxxmlreader_put_errorHandler ( IVBSAXXMLReader *  iface,
IVBSAXErrorHandler *  handler 
)
static

Definition at line 3087 of file saxreader.c.

◆ saxxmlreader_put_secureBaseURL()

static HRESULT WINAPI saxxmlreader_put_secureBaseURL ( IVBSAXXMLReader *  iface,
BSTR  secureBaseUrl 
)
static

Definition at line 3123 of file saxreader.c.

3126{
3128 return ISAXXMLReader_putSecureBaseURL(&This->ISAXXMLReader_iface, secureBaseUrl);
3129}

◆ saxxmlreader_putFeature()

static HRESULT WINAPI saxxmlreader_putFeature ( IVBSAXXMLReader *  iface,
BSTR  feature_name,
VARIANT_BOOL  value 
)
static

Definition at line 3004 of file saxreader.c.

3008{
3010 return ISAXXMLReader_putFeature(&This->ISAXXMLReader_iface, feature_name, value);
3011}

◆ saxxmlreader_putProperty()

static HRESULT WINAPI saxxmlreader_putProperty ( IVBSAXXMLReader *  iface,
BSTR  pProp,
VARIANT  value 
)
static

Definition at line 3022 of file saxreader.c.

3026{
3028 return internal_putProperty(This, pProp, value, TRUE);
3029}

◆ saxxmlreader_QueryInterface()

static HRESULT WINAPI saxxmlreader_QueryInterface ( IVBSAXXMLReader *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 2877 of file saxreader.c.

2878{
2880
2881 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
2882
2883 *ppvObject = NULL;
2884
2885 if ( IsEqualGUID( riid, &IID_IUnknown ) ||
2887 IsEqualGUID( riid, &IID_IVBSAXXMLReader ))
2888 {
2889 *ppvObject = iface;
2890 }
2891 else if( IsEqualGUID( riid, &IID_ISAXXMLReader ))
2892 {
2893 *ppvObject = &This->ISAXXMLReader_iface;
2894 }
2895 else if (dispex_query_interface(&This->dispex, riid, ppvObject))
2896 {
2897 return *ppvObject ? S_OK : E_NOINTERFACE;
2898 }
2899 else
2900 {
2901 FIXME("interface %s not implemented\n", debugstr_guid(riid));
2902 return E_NOINTERFACE;
2903 }
2904
2905 IVBSAXXMLReader_AddRef( iface );
2906
2907 return S_OK;
2908}
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656

◆ saxxmlreader_Release()

static ULONG WINAPI saxxmlreader_Release ( IVBSAXXMLReader *  iface)
static

Definition at line 2917 of file saxreader.c.

2919{
2921 LONG ref;
2922
2923 TRACE("%p\n", This );
2924
2925 ref = InterlockedDecrement( &This->ref );
2926 if ( ref == 0 )
2927 {
2928 int i;
2929
2930 for (i = 0; i < SAXHandler_Last; i++)
2931 {
2932 struct saxanyhandler_iface *saxiface = &This->saxhandlers[i].u.anyhandler;
2933
2934 if (saxiface->handler)
2935 IUnknown_Release(saxiface->handler);
2936
2937 if (saxiface->vbhandler)
2938 IUnknown_Release(saxiface->vbhandler);
2939 }
2940
2941 SysFreeString(This->xmldecl_version);
2942 free_bstr_pool(&This->pool);
2943
2944 free(This);
2945 }
2946
2947 return ref;
2948}

◆ set_feature_value()

static HRESULT set_feature_value ( saxreader reader,
saxreader_feature  feature,
VARIANT_BOOL  value 
)
inlinestatic

Definition at line 418 of file saxreader.c.

419{
420 /* handling of non-VARIANT_* values is version dependent */
421 if ((reader->version < MSXML4) && (value != VARIANT_TRUE))
422 value = VARIANT_FALSE;
423 if ((reader->version >= MSXML4) && (value != VARIANT_FALSE))
424 value = VARIANT_TRUE;
425
426 if (value == VARIANT_TRUE)
427 reader->features |= feature;
428 else
429 reader->features &= ~feature;
430
431 return S_OK;
432}

Referenced by isaxxmlreader_putFeature().

◆ update_position()

static void update_position ( saxlocator This,
BOOL  fix_column 
)
static

Definition at line 696 of file saxreader.c.

697{
698 const xmlChar *p = This->pParserCtxt->input->cur-1;
699 const xmlChar *baseP = This->pParserCtxt->input->base;
700
701 This->line = xmlSAX2GetLineNumber(This->pParserCtxt);
702 if(fix_column)
703 {
704 This->column = 1;
705 for(;p>=baseP && *p!='\n' && *p!='\r'; p--)
706 This->column++;
707 }
708 else
709 {
710 This->column = xmlSAX2GetColumnNumber(This->pParserCtxt);
711 }
712}
XMLPUBFUN int xmlSAX2GetLineNumber(void *ctx)
Definition: SAX2.c:243
XMLPUBFUN int xmlSAX2GetColumnNumber(void *ctx)
Definition: SAX2.c:259

Referenced by libxml_cdatablock(), libxmlCharacters(), libxmlComment(), libxmlEndDocument(), libxmlEndElementNS(), libxmlStartDocument(), and libxmlStartElementNS().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

Variable Documentation

◆ empty_str

const WCHAR empty_str
static

Definition at line 146 of file saxreader.c.

Referenced by libxmlEndElementNS(), and libxmlStartElementNS().

◆ ExhaustiveErrorsW

const WCHAR ExhaustiveErrorsW[]
static
Initial value:
= {
'e','x','h','a','u','s','t','i','v','e','-','e','r','r','o','r','s',0
}

Definition at line 97 of file saxreader.c.

◆ FeatureExternalGeneralEntitiesW

const WCHAR FeatureExternalGeneralEntitiesW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/',
'f','e','a','t','u','r','e','s','/','e','x','t','e','r','n','a','l','-','g','e','n','e','r','a','l',
'-','e','n','t','i','t','i','e','s',0
}

Definition at line 67 of file saxreader.c.

◆ FeatureExternalParameterEntitiesW

const WCHAR FeatureExternalParameterEntitiesW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/','f','e','a','t','u','r','e','s',
'/','e','x','t','e','r','n','a','l','-','p','a','r','a','m','e','t','e','r','-','e','n','t','i','t','i','e','s',0
}

Definition at line 73 of file saxreader.c.

◆ FeatureLexicalHandlerParEntitiesW

const WCHAR FeatureLexicalHandlerParEntitiesW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/','f','e','a','t','u','r','e','s',
'/','l','e','x','i','c','a','l','-','h','a','n','d','l','e','r','/','p','a','r','a','m','e','t','e','r','-','e','n','t','i','t','i','e','s',0
}

Definition at line 78 of file saxreader.c.

◆ FeatureNamespacePrefixesW

const WCHAR FeatureNamespacePrefixesW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/','f','e','a','t','u','r','e','s',
'/','n','a','m','e','s','p','a','c','e','-','p','r','e','f','i','x','e','s',0
}

Definition at line 92 of file saxreader.c.

◆ FeatureNamespacesW

const WCHAR FeatureNamespacesW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/','f','e','a','t','u','r','e','s',
'/','n','a','m','e','s','p','a','c','e','s',0
}

Definition at line 87 of file saxreader.c.

◆ FeatureProhibitDTDW

const WCHAR FeatureProhibitDTDW[]
static
Initial value:
= {
'p','r','o','h','i','b','i','t','-','d','t','d',0
}

Definition at line 83 of file saxreader.c.

◆ isaxattributes_vtbl

const struct ISAXAttributesVtbl isaxattributes_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI isaxattributes_getTypeFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pType, int *nType)
Definition: saxreader.c:1293
static ULONG WINAPI isaxattributes_AddRef(ISAXAttributes *iface)
Definition: saxreader.c:1089
static HRESULT WINAPI isaxattributes_getLength(ISAXAttributes *iface, int *length)
Definition: saxreader.c:1105
static ULONG WINAPI isaxattributes_Release(ISAXAttributes *iface)
Definition: saxreader.c:1096
static HRESULT WINAPI isaxattributes_getName(ISAXAttributes *iface, int index, const WCHAR **uri, int *pUriLength, const WCHAR **localName, int *pLocalNameSize, const WCHAR **QName, int *pQNameLength)
Definition: saxreader.c:1177
static HRESULT WINAPI isaxattributes_getURI(ISAXAttributes *iface, int index, const WCHAR **url, int *size)
Definition: saxreader.c:1121
static HRESULT WINAPI isaxattributes_getLocalName(ISAXAttributes *iface, int index, const WCHAR **pLocalName, int *pLocalNameLength)
Definition: saxreader.c:1141
static HRESULT WINAPI isaxattributes_getQName(ISAXAttributes *iface, int index, const WCHAR **pQName, int *pQNameLength)
Definition: saxreader.c:1159
static HRESULT WINAPI isaxattributes_getValue(ISAXAttributes *iface, int index, const WCHAR **value, int *nValue)
Definition: saxreader.c:1306
static HRESULT WINAPI isaxattributes_getValueFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pValue, int *nValue)
Definition: saxreader.c:1348
static HRESULT WINAPI isaxattributes_getValueFromName(ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pValue, int *nValue)
Definition: saxreader.c:1326
static HRESULT WINAPI isaxattributes_getIndexFromName(ISAXAttributes *iface, const WCHAR *pUri, int cUriLength, const WCHAR *pLocalName, int cocalNameLength, int *index)
Definition: saxreader.c:1206
static HRESULT WINAPI isaxattributes_getType(ISAXAttributes *iface, int nIndex, const WCHAR **pType, int *pTypeLength)
Definition: saxreader.c:1265
static HRESULT WINAPI isaxattributes_QueryInterface(ISAXAttributes *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:1079
static HRESULT WINAPI isaxattributes_getIndexFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQNameLength, int *index)
Definition: saxreader.c:1240
static HRESULT WINAPI isaxattributes_getTypeFromName(ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pType, int *nType)
Definition: saxreader.c:1277

Definition at line 1366 of file saxreader.c.

Referenced by SAXLocator_create().

◆ ivbsaxattributes_vtbl

const struct IVBSAXAttributesVtbl ivbsaxattributes_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI ivbsaxattributes_AddRef(IVBSAXAttributes *iface)
Definition: saxreader.c:725
static HRESULT WINAPI ivbsaxattributes_getValueFromQName(IVBSAXAttributes *iface, BSTR QName, BSTR *value)
Definition: saxreader.c:1030
static ULONG WINAPI ivbsaxattributes_Release(IVBSAXAttributes *iface)
Definition: saxreader.c:731
static HRESULT WINAPI ivbsaxattributes_getLocalName(IVBSAXAttributes *iface, int nIndex, BSTR *name)
Definition: saxreader.c:843
static HRESULT WINAPI ivbsaxattributes_getValue(IVBSAXAttributes *iface, int nIndex, BSTR *value)
Definition: saxreader.c:982
static HRESULT WINAPI ivbsaxattributes_getType(IVBSAXAttributes *iface, int nIndex, BSTR *type)
Definition: saxreader.c:910
static HRESULT WINAPI ivbsaxattributes_getURI(IVBSAXAttributes *iface, int nIndex, BSTR *uri)
Definition: saxreader.c:820
static HRESULT WINAPI ivbsaxattributes_getQName(IVBSAXAttributes *iface, int nIndex, BSTR *QName)
Definition: saxreader.c:866
static HRESULT WINAPI ivbsaxattributes_getValueFromName(IVBSAXAttributes *iface, BSTR uri, BSTR localName, BSTR *value)
Definition: saxreader.c:1005
static HRESULT WINAPI ivbsaxattributes_get_length(IVBSAXAttributes *iface, int *nLength)
Definition: saxreader.c:812
static HRESULT WINAPI ivbsaxattributes_getIndexFromName(IVBSAXAttributes *iface, BSTR uri, BSTR localName, int *index)
Definition: saxreader.c:889
static HRESULT WINAPI ivbsaxattributes_Invoke(IVBSAXAttributes *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: saxreader.c:784
static HRESULT WINAPI ivbsaxattributes_GetIDsOfNames(IVBSAXAttributes *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: saxreader.c:757
static HRESULT WINAPI ivbsaxattributes_getTypeFromName(IVBSAXAttributes *iface, BSTR uri, BSTR localName, BSTR *type)
Definition: saxreader.c:933
static HRESULT WINAPI ivbsaxattributes_getTypeFromQName(IVBSAXAttributes *iface, BSTR QName, BSTR *type)
Definition: saxreader.c:958
static HRESULT WINAPI ivbsaxattributes_QueryInterface(IVBSAXAttributes *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:715
static HRESULT WINAPI ivbsaxattributes_getIndexFromQName(IVBSAXAttributes *iface, BSTR QName, int *index)
Definition: saxreader.c:900
static HRESULT WINAPI ivbsaxattributes_GetTypeInfo(IVBSAXAttributes *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: saxreader.c:748
static HRESULT WINAPI ivbsaxattributes_GetTypeInfoCount(IVBSAXAttributes *iface, UINT *pctinfo)
Definition: saxreader.c:737

Definition at line 1054 of file saxreader.c.

Referenced by SAXLocator_create().

◆ PropertyCharsetW

const WCHAR PropertyCharsetW[]
static
Initial value:
= {
'c','h','a','r','s','e','t',0
}

Definition at line 373 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyDeclHandlerW

const WCHAR PropertyDeclHandlerW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/',
's','a','x','/','p','r','o','p','e','r','t','i','e','s','/',
'd','e','c','l','a','r','a','t','i','o','n',
'-','h','a','n','d','l','e','r',0
}

Definition at line 379 of file saxreader.c.

Referenced by internal_getProperty(), and internal_putProperty().

◆ PropertyDomNodeW

const WCHAR PropertyDomNodeW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/',
's','a','x','/','p','r','o','p','e','r','t','i','e','s','/',
'd','o','m','-','n','o','d','e',0
}

Definition at line 385 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyInputSourceW

const WCHAR PropertyInputSourceW[]
static
Initial value:
= {
'i','n','p','u','t','-','s','o','u','r','c','e',0
}

Definition at line 390 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyLexicalHandlerW

const WCHAR PropertyLexicalHandlerW[]
static
Initial value:
= {
'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/',
's','a','x','/','p','r','o','p','e','r','t','i','e','s','/',
'l','e','x','i','c','a','l','-','h','a','n','d','l','e','r',0
}

Definition at line 393 of file saxreader.c.

Referenced by internal_getProperty(), and internal_putProperty().

◆ PropertyMaxElementDepthW

const WCHAR PropertyMaxElementDepthW[]
static
Initial value:
= {
'm','a','x','-','e','l','e','m','e','n','t','-','d','e','p','t','h',0
}

Definition at line 398 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyMaxXMLSizeW

const WCHAR PropertyMaxXMLSizeW[]
static
Initial value:
= {
'm','a','x','-','x','m','l','-','s','i','z','e',0
}

Definition at line 401 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertySchemaDeclHandlerW

const WCHAR PropertySchemaDeclHandlerW[]
static
Initial value:
= {
's','c','h','e','m','a','-','d','e','c','l','a','r','a','t','i','o','n','-',
'h','a','n','d','l','e','r',0
}

Definition at line 404 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyXMLDeclEncodingW

const WCHAR PropertyXMLDeclEncodingW[]
static
Initial value:
= {
'x','m','l','d','e','c','l','-','e','n','c','o','d','i','n','g',0
}

Definition at line 408 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyXMLDeclStandaloneW

const WCHAR PropertyXMLDeclStandaloneW[]
static
Initial value:
= {
'x','m','l','d','e','c','l','-','s','t','a','n','d','a','l','o','n','e',0
}

Definition at line 411 of file saxreader.c.

Referenced by internal_putProperty().

◆ PropertyXmlDeclVersionW

const WCHAR PropertyXmlDeclVersionW[]
static
Initial value:
= {
'x','m','l','d','e','c','l','-','v','e','r','s','i','o','n',0
}

Definition at line 376 of file saxreader.c.

Referenced by internal_getProperty().

◆ PropertyXMLDeclVersionW

const WCHAR PropertyXMLDeclVersionW[]
static
Initial value:
= {
'x','m','l','d','e','c','l','-','v','e','r','s','i','o','n',0
}

Definition at line 414 of file saxreader.c.

Referenced by internal_putProperty().

◆ SAXLocatorVtbl

const struct ISAXLocatorVtbl SAXLocatorVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI isaxlocator_getColumnNumber(ISAXLocator *iface, int *pnColumn)
Definition: saxreader.c:2357
static HRESULT WINAPI isaxlocator_getSystemId(ISAXLocator *iface, const WCHAR **ppwchSystemId)
Definition: saxreader.c:2399
static ULONG WINAPI isaxlocator_AddRef(ISAXLocator *iface)
Definition: saxreader.c:2309
static HRESULT WINAPI isaxlocator_getLineNumber(ISAXLocator *iface, int *pnLine)
Definition: saxreader.c:2367
static ULONG WINAPI isaxlocator_Release(ISAXLocator *iface)
Definition: saxreader.c:2317
static HRESULT WINAPI isaxlocator_QueryInterface(ISAXLocator *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:2281
static HRESULT WINAPI isaxlocator_getPublicId(ISAXLocator *iface, const WCHAR **ppwchPublicId)
Definition: saxreader.c:2377

Definition at line 2421 of file saxreader.c.

Referenced by SAXLocator_create().

◆ saxreader_dispex

dispex_static_data_t saxreader_dispex
static
Initial value:
= {
}
static const tid_t saxreader_iface_tids[]
Definition: saxreader.c:3416
@ IVBSAXXMLReader_tid
Definition: msxml_dispex.h:73

Definition at line 3420 of file saxreader.c.

Referenced by SAXXMLReader_create().

◆ saxreader_feature_map

const struct saxreader_feature_pair saxreader_feature_map[]
static
Initial value:
= {
}
static const WCHAR FeatureLexicalHandlerParEntitiesW[]
Definition: saxreader.c:78
static const WCHAR FeatureNamespacesW[]
Definition: saxreader.c:87
static const WCHAR FeatureProhibitDTDW[]
Definition: saxreader.c:83
static const WCHAR ExhaustiveErrorsW[]
Definition: saxreader.c:97
static const WCHAR FeatureExternalGeneralEntitiesW[]
Definition: saxreader.c:67
static const WCHAR SchemaValidationW[]
Definition: saxreader.c:101
static const WCHAR FeatureExternalParameterEntitiesW[]
Definition: saxreader.c:73
static const WCHAR FeatureNamespacePrefixesW[]
Definition: saxreader.c:92

Definition at line 111 of file saxreader.c.

Referenced by get_saxreader_feature().

◆ saxreader_iface_tids

const tid_t saxreader_iface_tids[]
static
Initial value:

Definition at line 3416 of file saxreader.c.

◆ SAXXMLReaderVtbl

const struct ISAXXMLReaderVtbl SAXXMLReaderVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI isaxxmlreader_putBaseURL(ISAXXMLReader *iface, const WCHAR *pBaseUrl)
Definition: saxreader.c:3346
static ULONG WINAPI isaxxmlreader_Release(ISAXXMLReader *iface)
Definition: saxreader.c:3190
static HRESULT WINAPI isaxxmlreader_putSecureBaseURL(ISAXXMLReader *iface, const WCHAR *secureBaseUrl)
Definition: saxreader.c:3365
static HRESULT WINAPI isaxxmlreader_getErrorHandler(ISAXXMLReader *iface, ISAXErrorHandler **handler)
Definition: saxreader.c:3322
static HRESULT WINAPI isaxxmlreader_getFeature(ISAXXMLReader *iface, const WCHAR *feature_name, VARIANT_BOOL *value)
Definition: saxreader.c:3197
static HRESULT WINAPI isaxxmlreader_getEntityResolver(ISAXXMLReader *iface, ISAXEntityResolver **resolver)
Definition: saxreader.c:3274
static HRESULT WINAPI isaxxmlreader_parse(ISAXXMLReader *iface, VARIANT varInput)
Definition: saxreader.c:3375
static HRESULT WINAPI isaxxmlreader_putEntityResolver(ISAXXMLReader *iface, ISAXEntityResolver *resolver)
Definition: saxreader.c:3282
static HRESULT WINAPI isaxxmlreader_parseURL(ISAXXMLReader *iface, const WCHAR *url)
Definition: saxreader.c:3383
static HRESULT WINAPI isaxxmlreader_putFeature(ISAXXMLReader *iface, const WCHAR *feature_name, VARIANT_BOOL value)
Definition: saxreader.c:3222
static HRESULT WINAPI isaxxmlreader_QueryInterface(ISAXXMLReader *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:3178
static ULONG WINAPI isaxxmlreader_AddRef(ISAXXMLReader *iface)
Definition: saxreader.c:3184
static HRESULT WINAPI isaxxmlreader_putContentHandler(ISAXXMLReader *iface, ISAXContentHandler *handler)
Definition: saxreader.c:3298
static HRESULT WINAPI isaxxmlreader_getDTDHandler(ISAXXMLReader *iface, ISAXDTDHandler **handler)
Definition: saxreader.c:3306
static HRESULT WINAPI isaxxmlreader_getContentHandler(ISAXXMLReader *iface, ISAXContentHandler **handler)
Definition: saxreader.c:3290
static HRESULT WINAPI isaxxmlreader_putErrorHandler(ISAXXMLReader *iface, ISAXErrorHandler *handler)
Definition: saxreader.c:3330
static HRESULT WINAPI isaxxmlreader_getBaseURL(ISAXXMLReader *iface, const WCHAR **base_url)
Definition: saxreader.c:3336
static HRESULT WINAPI isaxxmlreader_getProperty(ISAXXMLReader *iface, const WCHAR *prop, VARIANT *value)
Definition: saxreader.c:3256
static HRESULT WINAPI isaxxmlreader_putProperty(ISAXXMLReader *iface, const WCHAR *pProp, VARIANT value)
Definition: saxreader.c:3265
static HRESULT WINAPI isaxxmlreader_putDTDHandler(ISAXXMLReader *iface, ISAXDTDHandler *handler)
Definition: saxreader.c:3314
static HRESULT WINAPI isaxxmlreader_getSecureBaseURL(ISAXXMLReader *iface, const WCHAR **pSecureBaseUrl)
Definition: saxreader.c:3356

Definition at line 3391 of file saxreader.c.

Referenced by SAXXMLReader_create().

◆ SchemaValidationW

const WCHAR SchemaValidationW[]
static
Initial value:
= {
's','c','h','e','m','a','-','v','a','l','i','d','a','t','i','o','n',0
}

Definition at line 101 of file saxreader.c.

◆ VBSAXLocatorVtbl

const struct IVBSAXLocatorVtbl VBSAXLocatorVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ivbsaxlocator_get_systemId(IVBSAXLocator *iface, BSTR *ret)
Definition: saxreader.c:2245
static HRESULT WINAPI ivbsaxlocator_Invoke(IVBSAXLocator *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: saxreader.c:2182
static ULONG WINAPI ivbsaxlocator_Release(IVBSAXLocator *iface)
Definition: saxreader.c:2128
static HRESULT WINAPI ivbsaxlocator_GetIDsOfNames(IVBSAXLocator *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: saxreader.c:2155
static HRESULT WINAPI ivbsaxlocator_get_lineNumber(IVBSAXLocator *iface, int *pnLine)
Definition: saxreader.c:2218
static HRESULT WINAPI ivbsaxlocator_GetTypeInfoCount(IVBSAXLocator *iface, UINT *pctinfo)
Definition: saxreader.c:2135
static HRESULT WINAPI ivbsaxlocator_get_columnNumber(IVBSAXLocator *iface, int *pnColumn)
Definition: saxreader.c:2210
static HRESULT WINAPI ivbsaxlocator_GetTypeInfo(IVBSAXLocator *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: saxreader.c:2146
static HRESULT WINAPI ivbsaxlocator_get_publicId(IVBSAXLocator *iface, BSTR *ret)
Definition: saxreader.c:2226
static ULONG WINAPI ivbsaxlocator_AddRef(IVBSAXLocator *iface)
Definition: saxreader.c:2121
static HRESULT WINAPI ivbsaxlocator_QueryInterface(IVBSAXLocator *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:2092

Definition at line 2264 of file saxreader.c.

Referenced by SAXLocator_create().

◆ VBSAXXMLReaderVtbl

const struct IVBSAXXMLReaderVtbl VBSAXXMLReaderVtbl
static
Initial value:
=
{
}
static ULONG WINAPI saxxmlreader_AddRef(IVBSAXXMLReader *iface)
Definition: saxreader.c:2910
static HRESULT WINAPI saxxmlreader_QueryInterface(IVBSAXXMLReader *iface, REFIID riid, void **ppvObject)
Definition: saxreader.c:2877
static HRESULT WINAPI saxxmlreader_GetIDsOfNames(IVBSAXXMLReader *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: saxreader.c:2965
static HRESULT WINAPI saxxmlreader_put_dtdHandler(IVBSAXXMLReader *iface, IVBSAXDTDHandler *handler)
Definition: saxreader.c:3071
static HRESULT WINAPI saxxmlreader_get_errorHandler(IVBSAXXMLReader *iface, IVBSAXErrorHandler **handler)
Definition: saxreader.c:3079
static HRESULT WINAPI saxxmlreader_put_secureBaseURL(IVBSAXXMLReader *iface, BSTR secureBaseUrl)
Definition: saxreader.c:3123
static HRESULT WINAPI saxxmlreader_parse(IVBSAXXMLReader *iface, VARIANT varInput)
Definition: saxreader.c:3131
static ULONG WINAPI saxxmlreader_Release(IVBSAXXMLReader *iface)
Definition: saxreader.c:2917
static HRESULT WINAPI saxxmlreader_putProperty(IVBSAXXMLReader *iface, BSTR pProp, VARIANT value)
Definition: saxreader.c:3022
static HRESULT WINAPI saxxmlreader_get_secureBaseURL(IVBSAXXMLReader *iface, BSTR *pSecureBaseUrl)
Definition: saxreader.c:3113
static HRESULT WINAPI saxxmlreader_get_contentHandler(IVBSAXXMLReader *iface, IVBSAXContentHandler **handler)
Definition: saxreader.c:3047
static HRESULT WINAPI saxxmlreader_getFeature(IVBSAXXMLReader *iface, BSTR feature_name, VARIANT_BOOL *value)
Definition: saxreader.c:2995
static HRESULT WINAPI saxxmlreader_parseURL(IVBSAXXMLReader *iface, BSTR url)
Definition: saxreader.c:3139
static HRESULT WINAPI saxxmlreader_get_baseURL(IVBSAXXMLReader *iface, BSTR *pBaseUrl)
Definition: saxreader.c:3095
static HRESULT WINAPI saxxmlreader_GetTypeInfoCount(IVBSAXXMLReader *iface, UINT *pctinfo)
Definition: saxreader.c:2950
static HRESULT WINAPI saxxmlreader_Invoke(IVBSAXXMLReader *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: saxreader.c:2978
static HRESULT WINAPI saxxmlreader_getProperty(IVBSAXXMLReader *iface, BSTR prop, VARIANT *value)
Definition: saxreader.c:3013
static HRESULT WINAPI saxxmlreader_put_contentHandler(IVBSAXXMLReader *iface, IVBSAXContentHandler *handler)
Definition: saxreader.c:3055
static HRESULT WINAPI saxxmlreader_put_entityResolver(IVBSAXXMLReader *iface, IVBSAXEntityResolver *resolver)
Definition: saxreader.c:3039
static HRESULT WINAPI saxxmlreader_put_errorHandler(IVBSAXXMLReader *iface, IVBSAXErrorHandler *handler)
Definition: saxreader.c:3087
static HRESULT WINAPI saxxmlreader_putFeature(IVBSAXXMLReader *iface, BSTR feature_name, VARIANT_BOOL value)
Definition: saxreader.c:3004
static HRESULT WINAPI saxxmlreader_GetTypeInfo(IVBSAXXMLReader *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: saxreader.c:2956
static HRESULT WINAPI saxxmlreader_get_dtdHandler(IVBSAXXMLReader *iface, IVBSAXDTDHandler **handler)
Definition: saxreader.c:3063
static HRESULT WINAPI saxxmlreader_get_entityResolver(IVBSAXXMLReader *iface, IVBSAXEntityResolver **resolver)
Definition: saxreader.c:3031
static HRESULT WINAPI saxxmlreader_put_baseURL(IVBSAXXMLReader *iface, BSTR pBaseUrl)
Definition: saxreader.c:3105

Definition at line 3147 of file saxreader.c.

Referenced by SAXXMLReader_create().