Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

238 lines
12 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1998.
  5. //
  6. // File: msxml.idl
  7. //
  8. //--------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//")
  11. cpp_quote("// Microsoft Windows")
  12. cpp_quote("// Copyright (C) Microsoft Corporation, 1997-1998.")
  13. cpp_quote("//")
  14. cpp_quote("//--------------------------------------------------------------------------")
  15. #include "msxmldid.h"
  16. #ifndef DO_NO_IMPORTS
  17. import "unknwn.idl";
  18. import "wtypes.idl";
  19. import "objidl.idl";
  20. import "oaidl.idl";
  21. #endif
  22. typedef struct _xml_error {
  23. unsigned _nLine; // line number
  24. BSTR _pchBuf; // current input buffer
  25. unsigned _cchBuf; // number of chars in buffer
  26. unsigned _ich; // index of the char when error occurred
  27. BSTR _pszFound; // token found
  28. BSTR _pszExpected; // token expected
  29. DWORD _reserved1; // reserved
  30. DWORD _reserved2; // reserved
  31. } XML_ERROR;
  32. [
  33. uuid(d63e0ce2-a0a2-11d0-9c02-00c04fc99c8e), // LIBID_MSXML
  34. helpstring("Microsoft XML, version 2.0"),
  35. lcid(0x0000),
  36. version(2.0)
  37. ]
  38. library MSXML
  39. {
  40. importlib("stdole32.tlb");
  41. importlib("stdole2.tlb");
  42. #include "xmldom.idl"
  43. #include "xmldso.idl"
  44. interface IXMLElementCollection;
  45. interface IXMLDocument;
  46. interface IXMLDocument2;
  47. interface IXMLElement;
  48. interface IXMLElement2;
  49. interface IXMLAttribute;
  50. interface IXMLError;
  51. interface IXMLElementNotificationSink;
  52. typedef [
  53. helpstring("Constants that define types for IXMLElement.")
  54. ] enum tagXMLEMEM_TYPE
  55. {
  56. XMLELEMTYPE_ELEMENT,
  57. XMLELEMTYPE_TEXT,
  58. XMLELEMTYPE_COMMENT,
  59. XMLELEMTYPE_DOCUMENT,
  60. XMLELEMTYPE_DTD,
  61. XMLELEMTYPE_PI,
  62. XMLELEMTYPE_OTHER
  63. } XMLELEM_TYPE;
  64. [
  65. local, object,
  66. uuid(65725580-9B5D-11d0-9BFE-00C04FC99C8E), // IID_IXMLElementCollection
  67. odl,
  68. dual,
  69. oleautomation,
  70. hidden, // replaced by IDOMNodeList
  71. helpstring("IXMLElementCollection helps to enumerate through a XML document tree.")
  72. ]
  73. interface IXMLElementCollection : IDispatch
  74. {
  75. [propput, restricted, hidden, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)] HRESULT length([in] long v);
  76. [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH), helpstring("get number of elements in this IXMLElementCollection.")] HRESULT length([retval, out] long * p);
  77. [propget, restricted, hidden, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)] HRESULT _newEnum([retval, out] IUnknown ** ppUnk);
  78. [id(DISPID_XMLELEMENTCOLLECTION_ITEM), helpstring("get current item, or (optional) by index and name.")] HRESULT item([optional, in] VARIANT var1,[optional, in] VARIANT var2,[retval, out] IDispatch ** ppDisp);
  79. };
  80. [
  81. local, object,
  82. uuid(F52E2B61-18A1-11d1-B105-00805F49916B), // IID_IXMLDocument
  83. odl,
  84. dual,
  85. oleautomation,
  86. hidden, // replaced by IDOMDocument
  87. helpstring("IXMLDocument loads and saves XML document. This is obsolete. You should use IDOMDocument or IXMLDOMDocument.")
  88. ]
  89. interface IXMLDocument : IDispatch
  90. {
  91. [propget, id(DISPID_XMLDOCUMENT_ROOT), helpstring("get root IXMLElement of the XML document.")] HRESULT root ([retval, out] IXMLElement * * p);
  92. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILESIZE)] HRESULT fileSize([retval, out] BSTR * p);
  93. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)] HRESULT fileModifiedDate([retval, out] BSTR * p);
  94. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)] HRESULT fileUpdatedDate([retval, out] BSTR * p);
  95. [propget, id(DISPID_XMLDOCUMENT_URL), helpstring("set URL to load an XML document from the URL.")] HRESULT URL([retval, out] BSTR * p);
  96. [propput, id(DISPID_XMLDOCUMENT_URL), helpstring("get url.")] HRESULT URL([in] BSTR p);
  97. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_MIMETYPE)] HRESULT mimeType([retval, out] BSTR * p);
  98. [propget, id(DISPID_XMLDOCUMENT_READYSTATE), helpstring("get ready state.")] HRESULT readyState([retval, out]long *pl);
  99. [propget, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("get encoding.")] HRESULT charset([retval, out]BSTR *p);
  100. [propput, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("set encoding.")] HRESULT charset([in]BSTR p);
  101. [propget, id(DISPID_XMLDOCUMENT_VERSION), helpstring("get XML version number.")] HRESULT version([retval, out]BSTR *p);
  102. [propget, id(DISPID_XMLDOCUMENT_DOCTYPE), helpstring("get document type.")] HRESULT doctype([retval, out]BSTR *p);
  103. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_DTDURL)] HRESULT dtdURL([retval, out]BSTR *p);
  104. [id(DISPID_XMLDOCUMENT_CREATEELEMENT), helpstring("create different types of IXMLElements.")] HRESULT createElement([in] VARIANT vType, [optional, in] VARIANT var1, [retval, out] IXMLElement * * ppElem);
  105. };
  106. [
  107. local, object,
  108. uuid(2B8DE2FE-8D2D-11d1-B2FC-00C04FD915A9), // IID_IXMLDocument2
  109. hidden // Because that this interface is the default interface of coclass XMLDocument
  110. ]
  111. interface IXMLDocument2 : IDispatch
  112. {
  113. [propget, id(DISPID_XMLDOCUMENT_ROOT), helpstring("get root IXMLElement of the XML document.")] HRESULT root ([retval, out] IXMLElement2 * * p);
  114. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILESIZE)] HRESULT fileSize([retval, out] BSTR * p);
  115. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)] HRESULT fileModifiedDate([retval, out] BSTR * p);
  116. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)] HRESULT fileUpdatedDate([retval, out] BSTR * p);
  117. [propget, id(DISPID_XMLDOCUMENT_URL), helpstring("set URL to load an XML document from the URL.")] HRESULT URL([retval, out] BSTR * p);
  118. [propput, id(DISPID_XMLDOCUMENT_URL), helpstring("get url.")] HRESULT URL([in] BSTR p);
  119. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_MIMETYPE)] HRESULT mimeType([retval, out] BSTR * p);
  120. [propget, id(DISPID_XMLDOCUMENT_READYSTATE), helpstring("get ready state.")] HRESULT readyState([retval, out]long *pl);
  121. [propget, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("get encoding.")] HRESULT charset([retval, out]BSTR *p);
  122. [propput, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("set encoding.")] HRESULT charset([in]BSTR p);
  123. [propget, id(DISPID_XMLDOCUMENT_VERSION), helpstring("get XML version number.")] HRESULT version([retval, out]BSTR *p);
  124. [propget, id(DISPID_XMLDOCUMENT_DOCTYPE), helpstring("get document type.")] HRESULT doctype([retval, out]BSTR *p);
  125. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_DTDURL)] HRESULT dtdURL([retval, out]BSTR *p);
  126. [id(DISPID_XMLDOCUMENT_CREATEELEMENT), helpstring("create different types of IXMLElements.")] HRESULT createElement([in] VARIANT vType, [optional, in] VARIANT var1, [retval, out] IXMLElement2 * * ppElem);
  127. [propget, id(DISPID_XMLDOCUMENT_ASYNC), helpstring("get asynchronous loading flag.")] HRESULT async([retval, out] VARIANT_BOOL * pf);
  128. [propput, id(DISPID_XMLDOCUMENT_ASYNC), helpstring("set flag to turn on/off asynchronous loading.")] HRESULT async([in] VARIANT_BOOL f);
  129. };
  130. [
  131. local, object,
  132. uuid(3F7F31AC-E15F-11d0-9C25-00C04FC99C8E), // IID_IXMLElement
  133. odl,
  134. dual,
  135. oleautomation,
  136. hidden, // replaced by IDOMNode
  137. helpstring("IXMLElement represents an element in the XML document tree.")
  138. ]
  139. interface IXMLElement : IDispatch
  140. {
  141. [propget, id(DISPID_XMLELEMENT_TAGNAME), helpstring("get tag name.")] HRESULT tagName([retval, out] BSTR * p);
  142. [propput, id(DISPID_XMLELEMENT_TAGNAME), helpstring("set tag name.")] HRESULT tagName([in] BSTR p);
  143. [propget, id(DISPID_XMLELEMENT_PARENT), helpstring("get parent IXMLElement.")] HRESULT parent([retval, out]IXMLElement **ppParent);
  144. [id(DISPID_XMLELEMENT_SETATTRIBUTE), helpstring("set attribute.")] HRESULT setAttribute([in] BSTR strPropertyName,[in] VARIANT PropertyValue);
  145. [id(DISPID_XMLELEMENT_GETATTRIBUTE), helpstring("get attribute.")] HRESULT getAttribute([in] BSTR strPropertyName,[retval, out] VARIANT* PropertyValue);
  146. [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE), helpstring("remove attribute.")] HRESULT removeAttribute([in] BSTR strPropertyName);
  147. [propget, id(DISPID_XMLELEMENT_CHILDREN), helpstring("get a IXMLElementCollection of children.")] HRESULT children([retval, out] IXMLElementCollection * * pp);
  148. [propget, id(DISPID_XMLELEMENT_TYPE), helpstring("get type of this IXMLElement.")] HRESULT type([retval, out] long *plType);
  149. [propget, id(DISPID_XMLELEMENT_TEXT), helpstring("get text.")] HRESULT text([retval, out] BSTR *p);
  150. [propput, id(DISPID_XMLELEMENT_TEXT), helpstring("set text.")] HRESULT text([in] BSTR p);
  151. [id(DISPID_XMLELEMENT_ADDCHILD), helpstring("add a child.")] HRESULT addChild([in] IXMLElement *pChildElem, long lIndex, long lReserved); // lReserved must be -1
  152. [id(DISPID_XMLELEMENT_REMOVECHILD), helpstring("remove a child.")] HRESULT removeChild([in]IXMLElement *pChildElem);
  153. }
  154. [
  155. local, object,
  156. uuid(2B8DE2FF-8D2D-11d1-B2FC-00C04FD915A9), // IID_IXMLElement2
  157. odl,
  158. dual,
  159. oleautomation,
  160. hidden, // replaced by IDOMNode
  161. helpstring("IXMLElement2 extends IXMLElement.")
  162. ]
  163. interface IXMLElement2 : IDispatch
  164. {
  165. [propget, id(DISPID_XMLELEMENT_TAGNAME), helpstring("get tag name.")] HRESULT tagName([retval, out] BSTR * p);
  166. [propput, id(DISPID_XMLELEMENT_TAGNAME), helpstring("set tag name.")] HRESULT tagName([in] BSTR p);
  167. [propget, id(DISPID_XMLELEMENT_PARENT), helpstring("get parent IXMLElement.")] HRESULT parent([retval, out]IXMLElement2 **ppParent);
  168. [id(DISPID_XMLELEMENT_SETATTRIBUTE), helpstring("set attribute.")] HRESULT setAttribute([in] BSTR strPropertyName,[in] VARIANT PropertyValue);
  169. [id(DISPID_XMLELEMENT_GETATTRIBUTE), helpstring("get attribute.")] HRESULT getAttribute([in] BSTR strPropertyName,[retval, out] VARIANT* PropertyValue);
  170. [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE), helpstring("remove attribute.")] HRESULT removeAttribute([in] BSTR strPropertyName);
  171. [propget, id(DISPID_XMLELEMENT_CHILDREN), helpstring("get a IXMLElementCollection of all children.")] HRESULT children([retval, out] IXMLElementCollection * * pp);
  172. [propget, id(DISPID_XMLELEMENT_TYPE), helpstring("get type of this IXMLElement.")] HRESULT type([retval, out] long *plType);
  173. [propget, id(DISPID_XMLELEMENT_TEXT), helpstring("get text.")] HRESULT text([retval, out] BSTR *p);
  174. [propput, id(DISPID_XMLELEMENT_TEXT), helpstring("set text.")] HRESULT text([in] BSTR p);
  175. [id(DISPID_XMLELEMENT_ADDCHILD), helpstring("add a child.")] HRESULT addChild([in] IXMLElement2 *pChildElem, long lIndex, long lReserved); // lReserved must be -1
  176. [id(DISPID_XMLELEMENT_REMOVECHILD), helpstring("remove a child.")] HRESULT removeChild([in]IXMLElement2 *pChildElem);
  177. [propget, id(DISPID_XMLELEMENT_ATTRIBUTES), helpstring("get a IXMLElementCollection of all attributes.")] HRESULT attributes([retval, out] IXMLElementCollection ** pp);
  178. }
  179. [
  180. local, object,
  181. uuid(D4D4A0FC-3B73-11d1-B2B4-00C04FB92596), // IID_IXMLAttribute
  182. odl,
  183. dual,
  184. oleautomation,
  185. hidden, // replaced by IDOMNode
  186. helpstring("IXMLAttribute allows to get attributes of an IXMLElement.")
  187. ]
  188. interface IXMLAttribute : IDispatch
  189. {
  190. [propget, id(DISPID_XMLATTRIBUTE_NAME), helpstring("get attribute name.")] HRESULT name([retval, out] BSTR* n);
  191. [propget, id(DISPID_XMLATTRIBUTE_VALUE), helpstring("get attribute value.")] HRESULT value([retval, out] BSTR* v);
  192. };
  193. [
  194. local, object,
  195. uuid(948C5AD3-C58D-11d0-9C0B-00C04FC99C8E), // IID_IXMLError
  196. odl,
  197. hidden, // this is not scriptable.
  198. helpstring("Gets error info.")
  199. ]
  200. interface IXMLError : IUnknown
  201. {
  202. HRESULT GetErrorInfo(XML_ERROR *pErrorReturn);
  203. }
  204. // XML Document Class
  205. [
  206. uuid(CFC399AF-D876-11d0-9C10-00C04FC99C8E), // CLSID_XMLDocument
  207. helpstring("XMLDocument extends IXML Document. It is obsolete. You should use DOMDocument. This object should not be confused with the XMLDocument property on the XML data island.")
  208. ]
  209. coclass XMLDocument
  210. {
  211. [default] interface IXMLDocument2;
  212. }
  213. }