2 * Copyright (C) 2011 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #pragma makedep register
25 interface IXMLNodeSource
;
27 interface IXMLNodeFactory
;
64 XML_VERSION
= XML_LASTNODETYPE
,
100 XML_E_PARSEERRORBASE
= 0xC00CE500L
,
102 XML_E_ENDOFINPUT
= XML_E_PARSEERRORBASE
,
103 XML_E_MISSINGEQUALS
= 0xC00CE501,
104 XML_E_MISSINGQUOTE
= 0xC00CE502,
105 XML_E_COMMENTSYNTAX
= 0xC00CE503,
106 XML_E_BADSTARTNAMECHAR
= 0xC00CE504,
107 XML_E_BADNAMECHAR
= 0xC00CE505,
108 XML_E_BADCHARINSTRING
= 0xC00CE506,
109 XML_E_XMLDECLSYNTAX
= 0xC00CE507,
110 XML_E_BADCHARDATA
= 0xC00CE508,
111 XML_E_MISSINGWHITESPACE
= 0xC00CE509,
112 XML_E_EXPECTINGTAGEND
= 0xC00CE50A,
113 XML_E_BADCHARINDTD
= 0xC00CE50B,
114 XML_E_BADCHARINDECL
= 0xC00CE50C,
115 XML_E_MISSINGSEMICOLON
= 0xC00CE50D,
116 XML_E_BADCHARINENTREF
= 0xC00CE50E,
117 XML_E_UNBALANCEDPAREN
= 0xC00CE50F,
118 XML_E_EXPECTINGOPENBRACKET
= 0xC00CE510,
119 XML_E_BADENDCONDSECT
= 0xC00CE511,
120 XML_E_INTERNALERROR
= 0xC00CE512,
121 XML_E_UNEXPECTED_WHITESPACE
= 0xC00CE513,
122 XML_E_INCOMPLETE_ENCODING
= 0xC00CE514,
123 XML_E_BADCHARINMIXEDMODEL
= 0xC00CE515,
124 XML_E_MISSING_STAR
= 0xC00CE516,
125 XML_E_BADCHARINMODEL
= 0xC00CE517,
126 XML_E_MISSING_PAREN
= 0xC00CE518,
127 XML_E_BADCHARINENUMERATION
= 0xC00CE519,
128 XML_E_PIDECLSYNTAX
= 0xC00CE51A,
129 XML_E_EXPECTINGCLOSEQUOTE
= 0xC00CE51B,
130 XML_E_MULTIPLE_COLONS
= 0xC00CE51C,
131 XML_E_INVALID_DECIMAL
= 0xC00CE51D,
132 XML_E_INVALID_HEXIDECIMAL
= 0xC00CE51E,
133 XML_E_INVALID_UNICODE
= 0xC00CE51F,
134 XML_E_WHITESPACEORQUESTIONMARK
= 0xC00CE520,
135 XML_E_ENDOFPE
= 0xC00CE521,
137 XML_E_TOKEN_ERROR
= XML_E_PARSEERRORBASE
+ 0x50,
138 XML_E_SUSPENDED
= 0xC00CE550,
139 XML_E_STOPPED
= 0xC00CE551,
140 XML_E_UNEXPECTEDENDTAG
= 0xC00CE552,
141 XML_E_UNCLOSEDTAG
= 0xC00CE553,
142 XML_E_DUPLICATEATTRIBUTE
= 0xC00CE554,
143 XML_E_MULTIPLEROOTS
= 0xC00CE555,
144 XML_E_INVALIDATROOTLEVEL
= 0xC00CE556,
145 XML_E_BADXMLDECL
= 0xC00CE557,
146 XML_E_MISSINGROOT
= 0xC00CE558,
147 XML_E_UNEXPECTEDEOF
= 0xC00CE559,
148 XML_E_BADPEREFINSUBSET
= 0xC00CE55A,
149 XML_E_PE_NESTING
= 0xC00CE55B,
150 XML_E_INVALID_CDATACLOSINGTAG
= 0xC00CE55C,
151 XML_E_UNCLOSEDPI
= 0xC00CE55D,
152 XML_E_UNCLOSEDSTARTTAG
= 0xC00CE55E,
153 XML_E_UNCLOSEDENDTAG
= 0xC00CE55F,
154 XML_E_UNCLOSEDSTRING
= 0xC00CE560,
155 XML_E_UNCLOSEDCOMMENT
= 0xC00CE561,
156 XML_E_UNCLOSEDDECL
= 0xC00CE562,
157 XML_E_UNCLOSEDMARKUPDECL
= 0xC00CE563,
158 XML_E_UNCLOSEDCDATA
= 0xC00CE564,
159 XML_E_BADDECLNAME
= 0xC00CE565,
160 XML_E_BADEXTERNALID
= 0xC00CE566,
161 XML_E_BADELEMENTINDTD
= 0xC00CE567,
162 XML_E_RESERVEDNAMESPACE
= 0xC00CE568,
163 XML_E_EXPECTING_VERSION
= 0xC00CE569,
164 XML_E_EXPECTING_ENCODING
= 0xC00CE56A,
165 XML_E_EXPECTING_NAME
= 0xC00CE56B,
166 XML_E_UNEXPECTED_ATTRIBUTE
= 0xC00CE56C,
167 XML_E_ENDTAGMISMATCH
= 0xC00CE56D,
168 XML_E_INVALIDENCODING
= 0xC00CE56E,
169 XML_E_INVALIDSWITCH
= 0xC00CE56F,
170 XML_E_EXPECTING_NDATA
= 0xC00CE570,
171 XML_E_INVALID_MODEL
= 0xC00CE571,
172 XML_E_INVALID_TYPE
= 0xC00CE572,
173 XML_E_INVALIDXMLSPACE
= 0xC00CE573,
174 XML_E_MULTI_ATTR_VALUE
= 0xC00CE574,
175 XML_E_INVALID_PRESENCE
= 0xC00CE575,
176 XML_E_BADXMLCASE
= 0xC00CE576,
177 XML_E_CONDSECTINSUBSET
= 0xC00CE577,
178 XML_E_CDATAINVALID
= 0xC00CE578,
179 XML_E_INVALID_STANDALONE
= 0xC00CE579,
180 XML_E_UNEXPECTED_STANDALONE
= 0xC00CE57A,
181 XML_E_DOCTYPE_IN_DTD
= 0xC00CE57B,
182 XML_E_MISSING_ENTITY
= 0xC00CE57C,
183 XML_E_ENTITYREF_INNAME
= 0xC00CE57D,
184 XML_E_DOCTYPE_OUTSIDE_PROLOG
= 0xC00CE57E,
185 XML_E_INVALID_VERSION
= 0xC00CE57F,
186 XML_E_DTDELEMENT_OUTSIDE_DTD
= 0xC00CE580,
187 XML_E_DUPLICATEDOCTYPE
= 0xC00CE581,
188 XML_E_RESOURCE
= 0xC00CE582,
189 XML_E_MISSINGNAME
= 0xC00CE583,
190 XML_E_LASTERROR
= 0xC00CE584
205 XMLFLAG_FLOATINGAMP
= 0x00000001,
206 XMLFLAG_SHORTENDTAGS
= 0x00000002,
207 XMLFLAG_CASEINSENSITIVE
= 0x00000004,
208 XMLFLAG_NONAMESPACES
= 0x00000008,
209 XMLFLAG_NOWHITESPACE
= 0x00000010,
210 XMLFLAG_IE4QUIRKS
= 0x00000020,
211 XMLFLAG_NODTDNODES
= 0x00000040,
212 XMLFLAG_IE4COMPATIBILITY
= 0x000000FF,
213 XMLFLAG_IE5COMPATIBILITY
= 0x00000100,
214 XMLFLAG_SAX
= 0x00000200,
215 XMLFLAG_NORMALIZELB
= 0x00000400,
216 XMLFLAG_IGNOREENCODING
= 0x00000800,
217 XMLFLAG_USEWINHTTP
= 0x00001000,
218 XMLFLAG_RUNBUFFERONLY
= 0x00002000,
219 XMLFLAG_PROHIBIT_DTD
= 0x00008000
228 XMLNF_STARTDTDSUBSET
,
235 XMLNF_LASTEVENT
= XMLNF_DATAAVAILABLE
236 } XML_NODEFACTORY_EVENT
;
238 typedef struct _XML_NODE_INFO
244 const WCHAR
* pwcText
;
252 uuid(d242361c
-51a0
-11d2
-9caf
-0060b0ec3d39
),
253 helpstring("Microsoft XML Parser 1.0"),
259 importlib
("stdole32.tlb");
260 importlib
("stdole2.tlb");
265 pointer_default(unique),
266 helpstring("IXMLNodeFactory Interface"),
267 uuid(d242361f
-51a0
-11d2
-9caf
-0060b0ec3d39
)
269 interface IXMLNodeFactory
: IUnknown
271 HRESULT NotifyEvent
([in] IXMLNodeSource
* pSource
,[in] XML_NODEFACTORY_EVENT iEvt
);
272 HRESULT BeginChildren
([in] IXMLNodeSource
* pSource
, [in] XML_NODE_INFO
* pNodeInfo
);
273 HRESULT EndChildren
([in] IXMLNodeSource
* pSource
, [in] BOOL fEmpty
, [in] XML_NODE_INFO
* pNodeInfo
);
274 HRESULT Error
([in] IXMLNodeSource
* pSource
,[in] HRESULT hrErrorCode
,
275 [in] USHORT cNumRecs
, [in] XML_NODE_INFO
** ppNodeInfo
);
276 HRESULT CreateNode
([in] IXMLNodeSource
* pSource
, [in] PVOID pNodeParent
, [in] USHORT cNumRecs
,
277 [in] XML_NODE_INFO
** ppNodeInfo
);
283 pointer_default(unique),
284 uuid(d242361d
-51a0
-11d2
-9caf
-0060b0ec3d39
)
286 interface IXMLNodeSource
: IUnknown
288 HRESULT SetFactory
([in] IXMLNodeFactory
* pNodeFactory
);
289 HRESULT GetFactory
([out] IXMLNodeFactory
** ppNodeFactory
);
290 HRESULT Abort
([in] BSTR bstrErrorInfo
);
291 ULONG GetLineNumber
();
292 ULONG GetLinePosition
();
293 ULONG GetAbsolutePosition
();
294 HRESULT GetLineBuffer
([out] const WCHAR
** ppBuf
,[out] ULONG
* Len
, [out] ULONG
* StartPos
);
295 HRESULT GetLastError
();
296 HRESULT GetErrorInfo
([out] BSTR* pErrorInfo
);
298 HRESULT GetURL
([out] const WCHAR
** ppBuf
);
304 pointer_default(unique),
305 helpstring("IXMLParser Interface"),
306 uuid(d242361e
-51a0
-11d2
-9caf
-0060b0ec3d39
)
308 interface IXMLParser
: IXMLNodeSource
310 HRESULT SetURL
([in] const WCHAR
* pszBaseUrl
,[in] const WCHAR
* pszRelativeUrl
,[in] BOOL fAsync
);
311 HRESULT Load
([in] BOOL fFullyAvailable
, [in] IMoniker
*pimkName
, [in] LPBC pibc
, [in] DWORD grfMode
);
312 HRESULT SetInput
([in] IUnknown
*pStm
);
313 HRESULT PushData
([in] const char* pData
, [in] ULONG ulChars
, [in] BOOL fLastBuffer
);
314 HRESULT LoadDTD
([in] const WCHAR
* pszBaseUrl
, [in] const WCHAR
* pszRelativeUrl
);
315 HRESULT LoadEntity
([in] const WCHAR
* pszBaseUrl
, [in] const WCHAR
* pszRelativeUrl
, [in] BOOL fpe
);
316 HRESULT ParseEntity
([in] const WCHAR
* pwcText
, [in] ULONG ulLen
, [in] BOOL fpe
);
317 HRESULT ExpandEntity
([in] const WCHAR
* pwcText
, [in] ULONG ulLen
);
318 HRESULT SetRoot
([in] PVOID pRoot
);
319 HRESULT GetRoot
([in] PVOID
* ppRoot
);
320 HRESULT Run
([in] long lChars
);
321 HRESULT GetParserState
();
324 HRESULT SetFlags
([in] ULONG iFlags
);
325 HRESULT SetSecureBaseURL
([in] const WCHAR
* pszBaseUrl
);
326 HRESULT GetSecureBaseURL
([out] const WCHAR
** ppwcBuf
);
332 helpstring("XML Parser"),
333 uuid(f5078f19
-c551
-11d3
-89b9
-0000f81fe221
),
335 progid
("Msxml2.XMLParser"),
336 vi_progid
("Msxml2.XMLParser"),
341 [default] interface IXMLParser
;
345 helpstring("XML Parser 2.6"),
346 uuid(f5078f20
-c551
-11d3
-89b9
-0000f81fe221
),
348 progid
("Msxml2.XMLParser.2.6"),
349 vi_progid
("Msxml2.XMLParser"),
354 [default] interface IXMLParser
;
358 helpstring("XML Parser 3.0"),
359 uuid(f5078f31
-c551
-11d3
-89b9
-0000f81fe221
),
361 progid
("Msxml2.XMLParser.3.0"),
362 vi_progid
("Msxml2.XMLParser"),
367 [default] interface IXMLParser
;
371 helpstring("XML Document"),
372 threading
(apartment
),
373 uuid(48123bc4
-99d9
-11d1
-a6b3
-00c04fd91555
),
379 interface IPersistMoniker
;
380 interface IPersistHistory
;
381 interface IOleCommandTarget
;
382 interface IOleObject
;