xmldom.idl 22.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (C) 2005 Mike McCormack
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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
17 18
 */

19 20
#include <xmldomdid.h>
#include <idispids.h>
21

22 23 24 25 26 27
#if !defined(progid) && !defined(__WIDL__)
#define threading(model)
#define progid(str)
#define vi_progid(str)
#endif

28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
interface IXMLDOMImplementation;
interface IXMLDOMNode;
interface IXMLDOMDocumentFragment;
interface IXMLDOMDocument;
interface IXMLDOMNodeList;
interface IXMLDOMNamedNodeMap;
interface IXMLDOMCharacterData;
interface IXMLDOMAttribute;
interface IXMLDOMElement;
interface IXMLDOMText;
interface IXMLDOMComment;
interface IXMLDOMProcessingInstruction;
interface IXMLDOMCDATASection;
interface IXMLDOMDocumentType;
interface IXMLDOMNotation;
interface IXMLDOMEntity;
interface IXMLDOMEntityReference;
interface IXMLDOMParseError;

47 48
cpp_quote("#ifndef __MSXML_DOMNODETYPE_DEFINED")
cpp_quote("#define __MSXML_DOMNODETYPE_DEFINED")
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
typedef enum tagDOMNodeType {
    NODE_INVALID,
    NODE_ELEMENT,
    NODE_ATTRIBUTE,
    NODE_TEXT,
    NODE_CDATA_SECTION,
    NODE_ENTITY_REFERENCE,
    NODE_ENTITY,
    NODE_PROCESSING_INSTRUCTION,
    NODE_COMMENT,
    NODE_DOCUMENT,
    NODE_DOCUMENT_TYPE,
    NODE_DOCUMENT_FRAGMENT,
    NODE_NOTATION
} DOMNodeType;
64
cpp_quote("#endif")
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

[
local,
object,
odl,
dual,
oleautomation,
/*nonextensible,*/
uuid(2933bf80-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMNode : IDispatch
{
    [propget, id(DISPID_DOM_NODE_NODENAME)]
    HRESULT nodeName( [out,retval] BSTR *name );

    [propget, id(DISPID_DOM_NODE_NODEVALUE)]
    HRESULT nodeValue( [out,retval] VARIANT *value );

    [propput, id(DISPID_DOM_NODE_NODEVALUE)]
85
    HRESULT nodeValue( [in] VARIANT value );
86 87 88 89 90

    [propget, id(DISPID_DOM_NODE_NODETYPE)]
    HRESULT nodeType( [out,retval] DOMNodeType *type );

    [propget, id(DISPID_DOM_NODE_PARENTNODE)]
91
    HRESULT parentNode( [out,retval] IXMLDOMNode **parent );
92 93

    [propget, id(DISPID_DOM_NODE_CHILDNODES)]
94
    HRESULT childNodes( [out,retval] IXMLDOMNodeList **childList );
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131

    [propget, id(DISPID_DOM_NODE_FIRSTCHILD)]
    HRESULT firstChild( [out,retval] IXMLDOMNode **firstChild );

    [propget, id(DISPID_DOM_NODE_LASTCHILD)]
    HRESULT lastChild( [out,retval] IXMLDOMNode **lastChild );

    [propget, id(DISPID_DOM_NODE_PREVIOUSSIBLING)]
    HRESULT previousSibling( [out,retval] IXMLDOMNode **previousSibling );

    [propget, id(DISPID_DOM_NODE_NEXTSIBLING)]
    HRESULT nextSibling( [out,retval] IXMLDOMNode **nextSibling );

    [propget, id(DISPID_DOM_NODE_ATTRIBUTES)]
    HRESULT attributes( [out,retval] IXMLDOMNamedNodeMap **attributeMap );

    [id(DISPID_DOM_NODE_INSERTBEFORE)]
    HRESULT insertBefore( [in] IXMLDOMNode * newChild,
                          [in] VARIANT refChild,
                          [out,retval] IXMLDOMNode **outNewChild );

    [id(DISPID_DOM_NODE_REPLACECHILD)]
    HRESULT replaceChild( [in] IXMLDOMNode *newChild,
                          [in] IXMLDOMNode *oldChild,
                          [out,retval] IXMLDOMNode **outOldChild );

    [id(DISPID_DOM_NODE_REMOVECHILD)]
    HRESULT removeChild( [in] IXMLDOMNode *childNode,
                         [out,retval] IXMLDOMNode **oldChild );

    [id(DISPID_DOM_NODE_APPENDCHILD)]
    HRESULT appendChild( [in] IXMLDOMNode *newChild,
                         [out,retval] IXMLDOMNode **outNewChild );

    [id(DISPID_DOM_NODE_HASCHILDNODES)]
    HRESULT hasChildNodes( [out,retval] VARIANT_BOOL *hasChild );

132
    [propget, id(DISPID_DOM_NODE_OWNERDOC)]
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
    HRESULT ownerDocument( [out,retval] IXMLDOMDocument **DOMDocument );

    [id(DISPID_DOM_NODE_CLONENODE)]
    HRESULT cloneNode( [in] VARIANT_BOOL deep,
                       [out,retval] IXMLDOMNode **cloneRoot );

    [propget, id(DISPID_XMLDOM_NODE_STRINGTYPE)]
    HRESULT nodeTypeString( [out,retval] BSTR *nodeType );

    [propget, id(DISPID_XMLDOM_NODE_TEXT)]
    HRESULT text( [out,retval] BSTR *text );

    [propput, id(DISPID_XMLDOM_NODE_TEXT)]
    HRESULT text( [in] BSTR text );

    [propget, id(DISPID_XMLDOM_NODE_SPECIFIED)]
    HRESULT specified( [out,retval] VARIANT_BOOL *isSpecified );

    [propget, id(DISPID_XMLDOM_NODE_DEFINITION)]
    HRESULT definition( [out,retval] IXMLDOMNode **definitionNode );

    [propget, id(DISPID_XMLDOM_NODE_NODETYPEDVALUE)]
    HRESULT nodeTypedValue( [out,retval] VARIANT *typedValue );

    [propput, id(DISPID_XMLDOM_NODE_NODETYPEDVALUE)]
    HRESULT nodeTypedValue( [in] VARIANT typedValue );

    [propget, id(DISPID_XMLDOM_NODE_DATATYPE)]
    HRESULT dataType( [out,retval] VARIANT *dataTypeName );

    [propput, id(DISPID_XMLDOM_NODE_DATATYPE)]
    HRESULT dataType( [in] BSTR dataTypeName );

    [propget, id(DISPID_XMLDOM_NODE_XML)]
    HRESULT xml( [out,retval] BSTR *xmlString );

    [id(DISPID_XMLDOM_NODE_TRANSFORMNODE)]
    HRESULT transformNode( [in] IXMLDOMNode *styleSheet,
                           [out,retval] BSTR *xmlString );

    [id(DISPID_XMLDOM_NODE_SELECTNODES)]
    HRESULT selectNodes( [in] BSTR queryString,
                         [out,retval] IXMLDOMNodeList **resultList );

    [id(DISPID_XMLDOM_NODE_SELECTSINGLENODE)]
    HRESULT selectSingleNode( [in] BSTR queryString,
                              [out,retval] IXMLDOMNode **resultNode );

    [propget, id(DISPID_XMLDOM_NODE_PARSED)]
    HRESULT parsed( [out,retval] VARIANT_BOOL *isParsed );

    [propget, id(DISPID_XMLDOM_NODE_NAMESPACE)]
    HRESULT namespaceURI( [out,retval] BSTR *namespaceURI );

    [propget, id(DISPID_XMLDOM_NODE_PREFIX)]
    HRESULT prefix( [out,retval] BSTR *prefixString );

    [propget, id(DISPID_XMLDOM_NODE_BASENAME)]
    HRESULT baseName( [out,retval] BSTR *nameString );

    [id(DISPID_XMLDOM_NODE_TRANSFORMNODETOOBJECT)]
    HRESULT transformNodeToObject( [in] IXMLDOMNode *stylesheet,
                                   [in] VARIANT outputObject );
196
}
197 198 199 200 201 202 203 204 205 206 207 208 209 210

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf81-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMDocument : IXMLDOMNode
{
    [propget, id(DISPID_DOM_DOCUMENT_DOCTYPE)]
211
    HRESULT doctype( [out,retval] IXMLDOMDocumentType **documentType );
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272

    [propget, id(DISPID_DOM_DOCUMENT_IMPLEMENTATION)]
    HRESULT implementation( [out,retval] IXMLDOMImplementation **impl );

    [propget, id(DISPID_DOM_DOCUMENT_DOCUMENTELEMENT)]
    HRESULT documentElement( [out,retval] IXMLDOMElement **DOMElement );

    [propputref, id(DISPID_DOM_DOCUMENT_DOCUMENTELEMENT)]
    HRESULT documentElement( [in] IXMLDOMElement *DOMElement );

    [id(DISPID_DOM_DOCUMENT_CREATEELEMENT)]
    HRESULT createElement( [in] BSTR tagname,
                           [out,retval] IXMLDOMElement **element );

    [id(DISPID_DOM_DOCUMENT_CREATEDOCUMENTFRAGMENT)]
    HRESULT createDocumentFragment( [out,retval] IXMLDOMDocumentFragment **docFrag );

    [id(DISPID_DOM_DOCUMENT_CREATETEXTNODE)]
    HRESULT createTextNode( [in] BSTR data,
                            [out,retval] IXMLDOMText **text );

    [id(DISPID_DOM_DOCUMENT_CREATECOMMENT)]
    HRESULT createComment( [in] BSTR data,
                           [out,retval] IXMLDOMComment **comment );

    [id(DISPID_DOM_DOCUMENT_CREATECDATASECTION)]
    HRESULT createCDATASection( [in] BSTR data,
                                [out,retval] IXMLDOMCDATASection **cdata );

    [id(DISPID_DOM_DOCUMENT_CREATEPROCESSINGINSTRUCTION)]
    HRESULT createProcessingInstruction( [in] BSTR target,
                                         [in] BSTR data,
                                         [out,retval] IXMLDOMProcessingInstruction **pi );

    [id(DISPID_DOM_DOCUMENT_CREATEATTRIBUTE)]
    HRESULT createAttribute( [in] BSTR name,
                             [out,retval] IXMLDOMAttribute **attribute );

    [id(DISPID_DOM_DOCUMENT_CREATEENTITYREFERENCE)]
    HRESULT createEntityReference( [in] BSTR name,
                                   [out,retval] IXMLDOMEntityReference **entityRef );

    [id(DISPID_DOM_DOCUMENT_GETELEMENTSBYTAGNAME)]
    HRESULT getElementsByTagName( [in] BSTR tagName,
                                  [out,retval] IXMLDOMNodeList **resultList );

    [id(DISPID_XMLDOM_DOCUMENT_CREATENODE)]
    HRESULT createNode( [in] VARIANT Type,
                        [in] BSTR name,
                        [in] BSTR namespaceURI,
                        [out,retval] IXMLDOMNode **node );

    [id(DISPID_XMLDOM_DOCUMENT_NODEFROMID)]
    HRESULT nodeFromID( [in] BSTR idString,
                        [out,retval] IXMLDOMNode **node );

    [id(DISPID_XMLDOM_DOCUMENT_LOAD)]
    HRESULT load( [in] VARIANT xmlSource,
                  [out,retval] VARIANT_BOOL *isSuccessful );

    [propget, id(DISPID_READYSTATE)]
273
    HRESULT readyState( [out,retval] LONG *value );
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323

    [propget, id(DISPID_XMLDOM_DOCUMENT_PARSEERROR)]
    HRESULT parseError( [out,retval] IXMLDOMParseError **errorObj );

    [propget, id(DISPID_XMLDOM_DOCUMENT_URL)]
    HRESULT url( [out,retval] BSTR *urlString );

    /* FIXME: these is meant to be async, but widl parses that as a keyword */
    [propget, id(DISPID_XMLDOM_DOCUMENT_ASYNC)]
    HRESULT async( [out,retval] VARIANT_BOOL *isAsync );

    [propput, id(DISPID_XMLDOM_DOCUMENT_ASYNC)]
    HRESULT async( [in] VARIANT_BOOL isAsync );

    [id(DISPID_XMLDOM_DOCUMENT_ABORT)]
    HRESULT abort();

    [id(DISPID_XMLDOM_DOCUMENT_LOADXML)]
    HRESULT loadXML( [in] BSTR bstrXML,
                     [out,retval] VARIANT_BOOL *isSuccessful );

    [id(DISPID_XMLDOM_DOCUMENT_SAVE)]
    HRESULT save( [in] VARIANT destination );

    [propget, id(DISPID_XMLDOM_DOCUMENT_VALIDATE)]
    HRESULT validateOnParse( [out,retval] VARIANT_BOOL *isValidating );

    [propput, id(DISPID_XMLDOM_DOCUMENT_VALIDATE)]
    HRESULT validateOnParse( [in] VARIANT_BOOL isValidating );

    [propget, id(DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE)]
    HRESULT resolveExternals( [out,retval] VARIANT_BOOL *isResolving );

    [propput, id(DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE)]
    HRESULT resolveExternals( [in] VARIANT_BOOL isValidating );

    [propget, id(DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE)]
    HRESULT preserveWhiteSpace( [out,retval] VARIANT_BOOL *isPreserving );

    [propput, id(DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE)]
    HRESULT preserveWhiteSpace( [in] VARIANT_BOOL isPreserving );

    [propput, id(DISPID_XMLDOM_DOCUMENT_ONREADYSTATECHANGE)]
    HRESULT onreadystatechange( [in] VARIANT readystatechangeSink );

    [propput, id(DISPID_XMLDOM_DOCUMENT_ONDATAAVAILABLE)]
    HRESULT ondataavailable( [in] VARIANT ondataavailableSink );

    [propput, id(DISPID_XMLDOM_DOCUMENT_ONTRANSFORMNODE)]
    HRESULT ontransformnode( [in] VARIANT ontransformnodeSink );
324
}
325 326 327 328 329 330 331 332 333 334 335 336 337 338

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf82-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMNodeList : IDispatch
{
    [propget, id(DISPID_VALUE)]
339
    HRESULT item( [in] LONG index,
340 341 342
                  [out,retval] IXMLDOMNode **listItem );

    [propget, id(DISPID_DOM_NODELIST_LENGTH)]
343
    HRESULT length( [out,retval] LONG *listLength );
344 345 346 347 348 349 350 351 352

    [id(DISPID_XMLDOM_NODELIST_NEXTNODE)]
    HRESULT nextNode( [out,retval] IXMLDOMNode **nextItem );

    [id(DISPID_XMLDOM_NODELIST_RESET)]
    HRESULT reset();

    [id(DISPID_NEWENUM)]
    HRESULT _newEnum( [out,retval] IUnknown **ppUnk );
353
}
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf83-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMNamedNodeMap : IDispatch
{
    [id(DISPID_DOM_NAMEDNODEMAP_GETNAMEDITEM)]
    HRESULT getNamedItem( [in] BSTR name,
                          [out,retval] IXMLDOMNode **namedItem );

    [id(DISPID_DOM_NAMEDNODEMAP_SETNAMEDITEM)]
    HRESULT setNamedItem( [in] IXMLDOMNode *newItem,
                          [out,retval] IXMLDOMNode **namedItem );

    [id(DISPID_DOM_NAMEDNODEMAP_REMOVENAMEDITEM)]
    HRESULT removeNamedItem( [in] BSTR name,
                             [out,retval] IXMLDOMNode **namedItem );

    [propget, id(DISPID_VALUE)]
380
    HRESULT item( [in] LONG index,
381 382 383
                  [out,retval] IXMLDOMNode **listItem );

    [propget, id(DISPID_DOM_NODELIST_LENGTH)]
384
    HRESULT length( [out,retval] LONG *listLength );
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403

    [id(DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM)]
    HRESULT getQualifiedItem( [in] BSTR baseName,
                              [in] BSTR namespaceURI,
                              [out,retval] IXMLDOMNode **qualifiedItem );

    [id(DISPID_XMLDOM_NAMEDNODEMAP_REMOVEQUALIFIEDITEM)]
    HRESULT removeQualifiedItem( [in] BSTR baseName,
                                 [in] BSTR namespaceURI,
                                 [out,retval] IXMLDOMNode **qualifiedItem );

    [id(DISPID_XMLDOM_NAMEDNODEMAP_NEXTNODE)]
    HRESULT nextNode( [out,retval] IXMLDOMNode **nextItem );

    [id(DISPID_XMLDOM_NAMEDNODEMAP_RESET)]
    HRESULT reset();

    [id(DISPID_NEWENUM)]
    HRESULT _newEnum( [out,retval] IUnknown **ppUnk );
404
}
405 406 407 408 409 410 411 412 413 414 415 416 417 418

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(3efaa413-272f-11d2-836f-0000f87a7782),
pointer_default(unique)
]
interface IXMLDOMDocumentFragment : IXMLDOMNode
{
    /* empty */
419
}
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf84-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMCharacterData : IXMLDOMNode
{
    [propget, id(DISPID_DOM_DATA_DATA)]
    HRESULT data( [out,retval] BSTR *data );

    [propput, id(DISPID_DOM_DATA_DATA)]
    HRESULT data( [in] BSTR data );

    [propget, id(DISPID_DOM_DATA_LENGTH)]
440
    HRESULT length( [out,retval] LONG *dataLength );
441 442

    [id(DISPID_DOM_DATA_SUBSTRING)]
443 444
    HRESULT substringData( [in] LONG offset,
                           [in] LONG count,
445 446 447 448 449 450
                           [out,retval] BSTR *data );

    [id(DISPID_DOM_DATA_APPEND)]
    HRESULT appendData( [in] BSTR data );

    [id(DISPID_DOM_DATA_INSERT)]
451
    HRESULT insertData( [in] LONG offset,
452 453 454
                        [in] BSTR data );

    [id(DISPID_DOM_DATA_DELETE)]
455 456
    HRESULT deleteData( [in] LONG offset,
                        [in] LONG count );
457 458

    [id(DISPID_DOM_DATA_REPLACE)]
459 460
    HRESULT replaceData( [in] LONG offset,
                         [in] LONG count,
461
                         [in] BSTR data );
462
}
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf85-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMAttribute : IXMLDOMNode
{
    [propget,id(DISPID_DOM_ATTRIBUTE_GETNAME)]
    HRESULT name( [out,retval] BSTR *attributeName );

    [propget,id(DISPID_DOM_ATTRIBUTE_VALUE)]
    HRESULT value( [out,retval] VARIANT *attributeValue );

    [propput,id(DISPID_DOM_ATTRIBUTE_VALUE)]
    HRESULT value( [in] VARIANT attributeValue );
484
}
485

486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf86-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMElement : IXMLDOMNode
{
    [propget, id(DISPID_DOM_ELEMENT_GETTAGNAME)]
    HRESULT tagName( [out,retval] BSTR *tagName );

    [id(DISPID_DOM_ELEMENT_GETATTRIBUTE)]
    HRESULT getAttribute( [in] BSTR name,
                          [out,retval] VARIANT * value );

    [id(DISPID_DOM_ELEMENT_SETATTRIBUTE)]
    HRESULT setAttribute( [in] BSTR name,
                          [in] VARIANT value );

    [id(DISPID_DOM_ELEMENT_REMOVEATTRIBUTE)]
    HRESULT removeAttribute( [in] BSTR name );

    [id(DISPID_DOM_ELEMENT_GETATTRIBUTENODE)]
    HRESULT getAttributeNode( [in] BSTR name,
                              [out, retval] IXMLDOMAttribute ** attributeNode );

    [id(DISPID_DOM_ELEMENT_SETATTRIBUTENODE)]
    HRESULT setAttributeNode( [in] IXMLDOMAttribute *DOMAttribute,
                              [out, retval] IXMLDOMAttribute ** attributeNode );

    [id(DISPID_DOM_ELEMENT_REMOVEATTRIBUTENODE)]
    HRESULT removeAttributeNode( [in] IXMLDOMAttribute *DOMAttribute,
                              [out, retval] IXMLDOMAttribute ** attributeNode );

    [id(DISPID_DOM_ELEMENT_GETELEMENTSBYTAGNAME)]
    HRESULT getElementsByTagName( [in] BSTR tagName,
                              [out, retval] IXMLDOMNodeList ** resultList );

    [id(DISPID_DOM_ELEMENT_NORMALIZE)]
    HRESULT normalize();
530
}
531 532 533 534 535 536 537 538 539 540 541 542 543 544

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf87-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMText : IXMLDOMCharacterData
{
    [id(DISPID_DOM_TEXT_SPLITTEXT)]
545
    HRESULT splitText( [in] LONG offset,
546
                       [out,retval] IXMLDOMText **rightHandTextNode );
547
}
548 549 550 551 552 553 554 555 556 557 558

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf88-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
559
interface IXMLDOMComment : IXMLDOMCharacterData
560 561
{
    /* empty */
562
}
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf89-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMProcessingInstruction : IXMLDOMNode
{
    [propget, id(DISPID_DOM_PI_TARGET)]
    HRESULT target( [out, retval] BSTR *name );

    [propget, id(DISPID_DOM_PI_DATA)]
    HRESULT data( [out, retval] BSTR *value );

    [propput, id(DISPID_DOM_PI_DATA)]
    HRESULT data( [in] BSTR value );
584
}
585 586 587 588 589 590 591 592 593 594 595 596 597 598

[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf8a-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMCDATASection : IXMLDOMText
{
    /* empty */
599
}
600

601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
[
local,
object,
odl,
dual,
/*nonextensible,*/
oleautomation,
uuid(2933bf8b-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMDocumentType : IXMLDOMNode
{
    [propget, id(DISPID_DOM_DOCUMENTTYPE_NAME)]
    HRESULT name( [out,retval] BSTR *rootName );

    [propget, id(DISPID_DOM_DOCUMENTTYPE_ENTITIES)]
    HRESULT entities( [out,retval] IXMLDOMNamedNodeMap **entityMap );

    [propget, id(DISPID_DOM_DOCUMENTTYPE_NOTATIONS)]
    HRESULT notations( [out,retval] IXMLDOMNamedNodeMap **notationMap );
621
}
622

623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
[
local,
object,
odl,
dual,
nonextensible,
oleautomation,
uuid(2933bf8c-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMNotation : IXMLDOMNode
{
    [propget, id(DISPID_DOM_NOTATION_PUBLICID)]
    HRESULT publicId([out, retval] VARIANT *publicId);

    [propget, id(DISPID_DOM_NOTATION_SYSTEMID)]
    HRESULT systemId([out, retval] VARIANT *systemId);
}

[
local,
object,
odl,
dual,
nonextensible,
oleautomation,
uuid(2933bf8d-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMEntity : IXMLDOMNode
{
    [propget, id(DISPID_DOM_ENTITY_PUBLICID)]
    HRESULT publicId([out, retval] VARIANT *publicId);

    [propget, id(DISPID_DOM_ENTITY_SYSTEMID)]
    HRESULT systemId([out, retval] VARIANT *systemId);

    [propget, id(DISPID_DOM_ENTITY_NOTATIONNAME)]
    HRESULT notationName([out, retval] BSTR *name);
}

[
local,
object,
odl,
dual,
nonextensible,
oleautomation,
uuid(2933bf8e-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMEntityReference : IXMLDOMNode
{
}

[
local,
object,
odl,
dual,
nonextensible,
oleautomation,
uuid(2933bf8f-7b36-11d2-b20e-00c04f983e60),
pointer_default(unique)
]
interface IXMLDOMImplementation : IDispatch
{
    [id(DISPID_DOM_IMPLEMENTATION_HASFEATURE)]
    HRESULT hasFeature([in] BSTR feature, [in] BSTR version, [out, retval] VARIANT_BOOL *pbool);
}

Huw Davies's avatar
Huw Davies committed
694 695 696 697 698 699 700 701 702 703 704 705 706 707
[
local,
object,
odl,
dual,
oleautomation,
/*nonextensible,*/
helpstring("structure for reporting parse errors"),
pointer_default(unique),
uuid (3efaa426-272f-11d2-836f-0000f87a7782)
]
interface IXMLDOMParseError : IDispatch
{
    [propget, id(DISPID_VALUE)]
708
    HRESULT errorCode([retval, out] LONG *errCode);
Huw Davies's avatar
Huw Davies committed
709 710 711 712 713 714 715 716 717 718 719

    [propget, id(DISPID_DOM_ERROR_URL)]
    HRESULT url([retval, out] BSTR *p);

    [propget, id(DISPID_DOM_ERROR_REASON)]
    HRESULT reason([retval, out] BSTR *p);

    [propget, id(DISPID_DOM_ERROR_SRCTEXT)]
    HRESULT srcText([retval, out] BSTR *p);

    [propget, id(DISPID_DOM_ERROR_LINE)]
720
    HRESULT line([retval, out] LONG *lineNo);
Huw Davies's avatar
Huw Davies committed
721 722

    [propget, id(DISPID_DOM_ERROR_LINEPOS)]
723
    HRESULT linepos([retval, out] LONG * linePos);
Huw Davies's avatar
Huw Davies committed
724 725

    [propget, id(DISPID_DOM_ERROR_FILEPOS)]
726
    HRESULT filepos([retval, out] LONG * filePos);
727
}
Huw Davies's avatar
Huw Davies committed
728

729 730 731 732 733 734 735 736 737 738 739 740 741 742
[
    hidden,
    uuid(3efaa427-272f-11d2-836f-0000f87a7782)
]
dispinterface XMLDOMDocumentEvents
{
    properties:
    methods:
    [id(DISPID_XMLDOMEVENT_ONDATAAVAILABLE)]
    HRESULT ondataavailable();

    [id(DISPID_XMLDOMEVENT_ONREADYSTATECHANGE)]
    HRESULT onreadystatechange();
}
743 744

[
745 746 747 748
    helpstring("XML DOM Document"),
    progid("Microsoft.XMLDOM.1.0"),
    vi_progid("Microsoft.XMLDOM"),
    threading(both),
749
    version(1.0),
750
    uuid(2933bf90-7b36-11d2-b20e-00c04f983e60)
751 752 753 754 755
]
coclass DOMDocument
{
    [default] interface IXMLDOMDocument;
    [default, source] dispinterface XMLDOMDocumentEvents;
756
}
757 758

[
759 760 761 762
    helpstring("Free Threaded XML DOM Document"),
    progid("Microsoft.FreeThreadedXMLDOM.1.0"),
    vi_progid("Microsoft.FreeThreadedXMLDOM"),
    threading(both),
763
    version(1.0),
764
    uuid(2933bf91-7b36-11d2-b20e-00c04f983e60)
765 766 767 768 769 770
]
coclass DOMFreeThreadedDocument
{
    [default] interface IXMLDOMDocument;
    [default, source] dispinterface XMLDOMDocumentEvents;
}
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802

[
object,
uuid(ed8c108d-4349-11d2-91a4-00c04f7969e8),
odl,
dual,
oleautomation,
pointer_default(unique)
]
interface IXMLHttpRequest : IDispatch
{
    [id(1)]
    HRESULT open([in] BSTR bstrMethod, [in] BSTR bstrUrl,
                 [in, optional] VARIANT varAsync,
                 [in, optional] VARIANT varUser,
                 [in, optional] VARIANT varPassword);
    [id(2)]
    HRESULT setRequestHeader([in] BSTR bstrHeader, [in] BSTR bstrValue);

    [id(3)]
    HRESULT getResponseHeader([in] BSTR bstrHeader, [out, retval] BSTR *pbstrValue);

    [id(4)]
    HRESULT getAllResponseHeaders([out, retval] BSTR *pbstrHeaders);

    [id(5)]
    HRESULT send([in, optional] VARIANT varBody);

    [id(6)]
    HRESULT abort();

    [propget, id(7)]
803
    HRESULT status([out, retval] LONG *plStatus);
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820

    [propget, id(8)]
    HRESULT statusText([out, retval] BSTR *bstrStatus);

    [propget, id(9)]
    HRESULT responseXML([out, retval] IDispatch **ppBody);

    [propget, id(10)]
    HRESULT responseText([out, retval] BSTR *pbstrBody);

    [propget, id(11)]
    HRESULT responseBody([out, retval] VARIANT *pvarBody);

    [propget, id(12)]
    HRESULT responseStream([out, retval] VARIANT *pvarBody);

    [propget, id(13)]
821
    HRESULT readyState([out, retval] LONG *plState);
822 823 824

    [propput, id(14)]
    HRESULT onreadystatechange([in] IDispatch *pReadyStateSink);
825
}
826 827

[
828 829 830 831
    helpstring("XML HTTP Request"),
    progid("Microsoft.XMLHTTP.1.0"),
    vi_progid("Microsoft.XMLHTTP"),
    threading(apartment),
832
    version(1.0),
833
    uuid(ed8c108e-4349-11d2-91a4-00c04f7969e8)
834 835 836 837
]
coclass XMLHTTPRequest
{
    [default] interface IXMLHttpRequest;
838
}