1 | /*
|
---|
2 | * Copyright (C) 2005 Mike McCormack
|
---|
3 | * Copyright (C) 2005 Vijay Kiran Kamuju
|
---|
4 | *
|
---|
5 | * This library is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU Lesser General Public
|
---|
7 | * License as published by the Free Software Foundation; either
|
---|
8 | * version 2.1 of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This library is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
13 | * Lesser General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU Lesser General Public
|
---|
16 | * License along with this library; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
22 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
23 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
24 | * a choice of LGPL license versions is made available with the language indicating
|
---|
25 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
26 | * of the LGPL is applied is otherwise unspecified.
|
---|
27 | */
|
---|
28 |
|
---|
29 | #include <msxmldid.h>
|
---|
30 | #include <msxml2did.h>
|
---|
31 | #include <idispids.h>
|
---|
32 |
|
---|
33 | #ifndef DO_NO_IMPORTS
|
---|
34 | import "unknwn.idl";
|
---|
35 | import "wtypes.idl";
|
---|
36 | import "objidl.idl";
|
---|
37 | import "oaidl.idl";
|
---|
38 | #endif
|
---|
39 |
|
---|
40 | [
|
---|
41 | uuid(d63e0ce2-a0a2-11d0-9c02-00c04fc99c8e),
|
---|
42 | version(2.0),
|
---|
43 | helpstring("Microsoft XML, v2.0")
|
---|
44 | ]
|
---|
45 | library MSXML
|
---|
46 | {
|
---|
47 |
|
---|
48 | importlib("stdole2.tlb");
|
---|
49 |
|
---|
50 | #include <xmldom.idl>
|
---|
51 | #include <xmldso.idl>
|
---|
52 |
|
---|
53 | [
|
---|
54 | local,
|
---|
55 | object,
|
---|
56 | odl,
|
---|
57 | dual,
|
---|
58 | oleautomation,
|
---|
59 | uuid(65725580-9b5d-11d0-9bfe-00c04fc99c8e)
|
---|
60 | ]
|
---|
61 | interface IXMLElementCollection : IDispatch
|
---|
62 | {
|
---|
63 | [propput, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
|
---|
64 | HRESULT length( [in] LONG v );
|
---|
65 |
|
---|
66 | [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
|
---|
67 | HRESULT length( [retval, out] LONG *p );
|
---|
68 |
|
---|
69 | [propget, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)]
|
---|
70 | HRESULT _newEnum( [retval, out] IUnknown ** ppUnk );
|
---|
71 |
|
---|
72 | [id(DISPID_XMLELEMENTCOLLECTION_ITEM)]
|
---|
73 | HRESULT item(
|
---|
74 | [optional, in] VARIANT var1,
|
---|
75 | [optional, in] VARIANT var2,
|
---|
76 | [retval, out] IDispatch ** ppDisp );
|
---|
77 | }
|
---|
78 |
|
---|
79 | [
|
---|
80 | local,
|
---|
81 | object,
|
---|
82 | uuid(3f7f31ac-e15f-11d0-9c25-00c04fc99c8e)
|
---|
83 | ]
|
---|
84 | interface IXMLElement : IDispatch
|
---|
85 | {
|
---|
86 | [propget, id(DISPID_XMLELEMENT_TAGNAME)]
|
---|
87 | HRESULT tagName( [retval, out] BSTR *p);
|
---|
88 |
|
---|
89 | [propput, id(DISPID_XMLELEMENT_TAGNAME)]
|
---|
90 | HRESULT tagName( [in] BSTR p );
|
---|
91 |
|
---|
92 | [propget, id(DISPID_XMLELEMENT_PARENT)]
|
---|
93 | HRESULT parent( [retval, out] IXMLElement **parent );
|
---|
94 |
|
---|
95 | [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
|
---|
96 | HRESULT setAttribute(
|
---|
97 | [in] BSTR strPropertyName,
|
---|
98 | [in] VARIANT PropertyValue );
|
---|
99 |
|
---|
100 | [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
|
---|
101 | HRESULT getAttribute(
|
---|
102 | [in] BSTR strPropertyName,
|
---|
103 | [retval, out] VARIANT *PropertyValue );
|
---|
104 |
|
---|
105 | [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
|
---|
106 | HRESULT removeAttribute(
|
---|
107 | [in] BSTR strPropertyName );
|
---|
108 |
|
---|
109 | [propget, id(DISPID_XMLELEMENT_CHILDREN)]
|
---|
110 | HRESULT children( [retval, out] IXMLElementCollection **p );
|
---|
111 |
|
---|
112 | [propget, id(DISPID_XMLELEMENT_TYPE)]
|
---|
113 | HRESULT type( [retval, out] LONG *p );
|
---|
114 |
|
---|
115 | [propget, id(DISPID_XMLELEMENT_TEXT)]
|
---|
116 | HRESULT text( [retval, out] BSTR *p );
|
---|
117 |
|
---|
118 | [propput, id(DISPID_XMLELEMENT_TEXT)]
|
---|
119 | HRESULT text( [in] BSTR p );
|
---|
120 |
|
---|
121 | [id(DISPID_XMLELEMENT_ADDCHILD)]
|
---|
122 | HRESULT addChild(
|
---|
123 | [in] IXMLElement *pChildElem,
|
---|
124 | [in] LONG lIndex,
|
---|
125 | [in] LONG lreserved );
|
---|
126 |
|
---|
127 | [id(DISPID_XMLELEMENT_REMOVECHILD)]
|
---|
128 | HRESULT removeChild(
|
---|
129 | [in] IXMLElement *pChildElem );
|
---|
130 | }
|
---|
131 |
|
---|
132 | [
|
---|
133 | local,
|
---|
134 | object,
|
---|
135 | uuid(f52e2b61-18a1-11d1-b105-00805f49916b)
|
---|
136 | ]
|
---|
137 | interface IXMLDocument : IDispatch
|
---|
138 | {
|
---|
139 | [propget, id(DISPID_XMLDOCUMENT_ROOT)]
|
---|
140 | HRESULT root( [retval, out] IXMLElement **p );
|
---|
141 |
|
---|
142 | [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
|
---|
143 | HRESULT fileSize( [retval, out] BSTR *p );
|
---|
144 |
|
---|
145 | [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
|
---|
146 | HRESULT fileModifiedDate( [retval, out] BSTR *p );
|
---|
147 |
|
---|
148 | [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
|
---|
149 | HRESULT fileUpdatedDate( [retval, out] BSTR *p );
|
---|
150 |
|
---|
151 | [propget, id(DISPID_XMLDOCUMENT_URL)]
|
---|
152 | HRESULT URL( [retval, out] BSTR *p );
|
---|
153 |
|
---|
154 | [propput, id(DISPID_XMLDOCUMENT_URL)]
|
---|
155 | HRESULT URL( [in] BSTR p );
|
---|
156 |
|
---|
157 | [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
|
---|
158 | HRESULT mimeType( [retval, out] BSTR *p );
|
---|
159 |
|
---|
160 | [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
|
---|
161 | HRESULT readyState( [retval, out] LONG *p );
|
---|
162 |
|
---|
163 | [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
|
---|
164 | HRESULT charset( [retval, out] BSTR *p );
|
---|
165 |
|
---|
166 | [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
|
---|
167 | HRESULT charset( [in] BSTR p );
|
---|
168 |
|
---|
169 | [propget, id(DISPID_XMLDOCUMENT_VERSION)]
|
---|
170 | HRESULT version( [retval, out] BSTR *p );
|
---|
171 |
|
---|
172 | [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
|
---|
173 | HRESULT doctype( [retval, out] BSTR *p );
|
---|
174 |
|
---|
175 | [propget, id(DISPID_XMLDOCUMENT_DTDURL)]
|
---|
176 | HRESULT dtdURl( [retval, out] BSTR *p );
|
---|
177 |
|
---|
178 | [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
|
---|
179 | HRESULT createElement(
|
---|
180 | [in] VARIANT vType,
|
---|
181 | [optional, in] VARIANT var1,
|
---|
182 | [retval, out] IXMLElement **ppElem );
|
---|
183 | }
|
---|
184 |
|
---|
185 | [
|
---|
186 | local,
|
---|
187 | object,
|
---|
188 | uuid(2B8DE2FF-8D2D-11d1-B2FC-00C04FD915A9)
|
---|
189 | ]
|
---|
190 | interface IXMLElement2 : IDispatch
|
---|
191 | {
|
---|
192 | [propget, id(DISPID_XMLELEMENT_TAGNAME)]
|
---|
193 | HRESULT tagName([retval, out] BSTR *p);
|
---|
194 |
|
---|
195 | [propput, id(DISPID_XMLELEMENT_TAGNAME)]
|
---|
196 | HRESULT tagName([in] BSTR p);
|
---|
197 |
|
---|
198 | [propget, id(DISPID_XMLELEMENT_PARENT)]
|
---|
199 | HRESULT parent([retval, out]IXMLElement2 **ppParent);
|
---|
200 |
|
---|
201 | [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
|
---|
202 | HRESULT setAttribute(
|
---|
203 | [in] BSTR strPropertyName,
|
---|
204 | [in] VARIANT PropertyValue);
|
---|
205 |
|
---|
206 | [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
|
---|
207 | HRESULT getAttribute(
|
---|
208 | [in] BSTR strPropertyName,
|
---|
209 | [retval, out] VARIANT *PropertyValue);
|
---|
210 |
|
---|
211 | [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
|
---|
212 | HRESULT removeAttribute([in] BSTR strPropertyName);
|
---|
213 |
|
---|
214 | [propget, id(DISPID_XMLELEMENT_CHILDREN)]
|
---|
215 | HRESULT children([retval, out] IXMLElementCollection **pp);
|
---|
216 |
|
---|
217 | [propget, id(DISPID_XMLELEMENT_TYPE)]
|
---|
218 | HRESULT type([retval, out] LONG *plType);
|
---|
219 |
|
---|
220 | [propget, id(DISPID_XMLELEMENT_TEXT)]
|
---|
221 | HRESULT text([retval, out] BSTR *p);
|
---|
222 |
|
---|
223 | [propput, id(DISPID_XMLELEMENT_TEXT)]
|
---|
224 | HRESULT text([in] BSTR p);
|
---|
225 |
|
---|
226 | [id(DISPID_XMLELEMENT_ADDCHILD)]
|
---|
227 | HRESULT addChild(
|
---|
228 | [in] IXMLElement2 *pChildElem,
|
---|
229 | [in] LONG lIndex,
|
---|
230 | [in] LONG lReserved);
|
---|
231 |
|
---|
232 | [id(DISPID_XMLELEMENT_REMOVECHILD)]
|
---|
233 | HRESULT removeChild([in]IXMLElement2 *pChildElem);
|
---|
234 |
|
---|
235 | [propget, id(DISPID_XMLELEMENT_ATTRIBUTES)]
|
---|
236 | HRESULT attributes([retval, out] IXMLElementCollection **pp);
|
---|
237 | }
|
---|
238 |
|
---|
239 | [
|
---|
240 | local,
|
---|
241 | object,
|
---|
242 | uuid(2B8DE2FE-8D2D-11d1-B2FC-00C04FD915A9)
|
---|
243 | ]
|
---|
244 | interface IXMLDocument2 : IDispatch
|
---|
245 | {
|
---|
246 | [propget, id(DISPID_XMLDOCUMENT_ROOT)]
|
---|
247 | HRESULT root([retval, out] IXMLElement2 **p);
|
---|
248 |
|
---|
249 | [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
|
---|
250 | HRESULT fileSize([retval, out] BSTR *p);
|
---|
251 |
|
---|
252 | [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
|
---|
253 | HRESULT fileModifiedDate([retval, out] BSTR *p);
|
---|
254 |
|
---|
255 | [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
|
---|
256 | HRESULT fileUpdatedDate([retval, out] BSTR *p);
|
---|
257 |
|
---|
258 | [propget, id(DISPID_XMLDOCUMENT_URL)]
|
---|
259 | HRESULT URL([retval, out] BSTR *p);
|
---|
260 |
|
---|
261 | [propput, id(DISPID_XMLDOCUMENT_URL)]
|
---|
262 | HRESULT URL([in] BSTR p);
|
---|
263 |
|
---|
264 | [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
|
---|
265 | HRESULT mimeType([retval, out] BSTR *p);
|
---|
266 |
|
---|
267 | [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
|
---|
268 | HRESULT readyState([retval, out]LONG *pl);
|
---|
269 |
|
---|
270 | [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
|
---|
271 | HRESULT charset([retval, out]BSTR *p);
|
---|
272 |
|
---|
273 | [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
|
---|
274 | HRESULT charset([in]BSTR p);
|
---|
275 |
|
---|
276 | [propget, id(DISPID_XMLDOCUMENT_VERSION)]
|
---|
277 | HRESULT version([retval, out]BSTR *p);
|
---|
278 |
|
---|
279 | [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
|
---|
280 | HRESULT doctype([retval, out]BSTR *p);
|
---|
281 |
|
---|
282 | [propget, restricted, id(DISPID_XMLDOCUMENT_DTDURL)]
|
---|
283 | HRESULT dtdURL([retval, out]BSTR *p);
|
---|
284 |
|
---|
285 | [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
|
---|
286 | HRESULT createElement(
|
---|
287 | [in] VARIANT vType,
|
---|
288 | [optional, in] VARIANT var,
|
---|
289 | [retval, out] IXMLElement2 **ppElem);
|
---|
290 |
|
---|
291 | [propget, id(DISPID_XMLDOCUMENT_ASYNC)]
|
---|
292 | HRESULT async([retval, out] VARIANT_BOOL *pf);
|
---|
293 |
|
---|
294 | [propput, id(DISPID_XMLDOCUMENT_ASYNC)]
|
---|
295 | HRESULT async([in] VARIANT_BOOL f);
|
---|
296 | }
|
---|
297 |
|
---|
298 | typedef enum tagXMLEMEM_TYPE {
|
---|
299 | XMLELEMTYPE_ELEMENT = 0,
|
---|
300 | XMLELEMTYPE_TEXT = 1,
|
---|
301 | XMLELEMTYPE_COMMENT = 2,
|
---|
302 | XMLELEMTYPE_DOCUMENT = 3,
|
---|
303 | XMLELEMTYPE_DTD = 4,
|
---|
304 | XMLELEMTYPE_PI = 5,
|
---|
305 | XMLELEMTYPE_OTHER = 6
|
---|
306 | } XMLELEM_TYPE;
|
---|
307 |
|
---|
308 | typedef struct _xml_error {
|
---|
309 | UINT _nLine;
|
---|
310 | BSTR _pchBuf;
|
---|
311 | BSTR _cchBuf;
|
---|
312 | UINT _ich;
|
---|
313 | BSTR _pszFound;
|
---|
314 | BSTR _pszExpected;
|
---|
315 | DWORD _reserved1;
|
---|
316 | DWORD _reserved2;
|
---|
317 | } XML_ERROR;
|
---|
318 |
|
---|
319 | [
|
---|
320 | local,
|
---|
321 | object,
|
---|
322 | uuid(d4d4a0fc-3b73-11d1-b2b4-00c04fb92596)
|
---|
323 | ]
|
---|
324 | interface IXMLAttribute : IDispatch
|
---|
325 | {
|
---|
326 | [propget, id(DISPID_XMLATTRIBUTE_NAME)]
|
---|
327 | HRESULT name( [retval, out] BSTR *p );
|
---|
328 |
|
---|
329 | [propget, id(DISPID_XMLATTRIBUTE_VALUE)]
|
---|
330 | HRESULT value( [retval, out] BSTR *p );
|
---|
331 | }
|
---|
332 |
|
---|
333 | [
|
---|
334 | local,
|
---|
335 | object,
|
---|
336 | uuid(948c5ad3-c58d-11d0-9c0b-00c04fc99c8e)
|
---|
337 | ]
|
---|
338 | interface IXMLError : IUnknown
|
---|
339 | {
|
---|
340 | HRESULT GetErrorInfo([out]XML_ERROR *pErrorReturn);
|
---|
341 | }
|
---|
342 |
|
---|
343 | [
|
---|
344 | object,
|
---|
345 | local,
|
---|
346 | uuid(D9F1E15A-CCDB-11d0-9C0C-00C04FC99C8E)
|
---|
347 | ]
|
---|
348 | interface IXMLElementNotificationSink : IDispatch
|
---|
349 | {
|
---|
350 | [id(DISPID_XMLNOTIFSINK_CHILDADDED)]
|
---|
351 | HRESULT ChildAdded([in]IDispatch *pChildElem);
|
---|
352 | }
|
---|
353 |
|
---|
354 | [
|
---|
355 | helpstring("Msxml"),
|
---|
356 | progid("Msxml"),
|
---|
357 | threading(both),
|
---|
358 | version(1.0),
|
---|
359 | uuid(cfc399af-d876-11d0-9c10-00c04fc99c8e)
|
---|
360 | ]
|
---|
361 | coclass XMLDocument
|
---|
362 | {
|
---|
363 | [default] interface IXMLDocument;
|
---|
364 | }
|
---|
365 |
|
---|
366 | } /* Library MSXML */
|
---|