Source code of Windows XP (NT5)
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.

237 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("stdole2.tlb");
  41. #include "xmldom.idl"
  42. #include "xmldso.idl"
  43. interface IXMLElementCollection;
  44. interface IXMLDocument;
  45. interface IXMLDocument2;
  46. interface IXMLElement;
  47. interface IXMLElement2;
  48. interface IXMLAttribute;
  49. interface IXMLError;
  50. interface IXMLElementNotificationSink;
  51. typedef [
  52. helpstring("Constants that define types for IXMLElement.")
  53. ] enum tagXMLEMEM_TYPE
  54. {
  55. XMLELEMTYPE_ELEMENT,
  56. XMLELEMTYPE_TEXT,
  57. XMLELEMTYPE_COMMENT,
  58. XMLELEMTYPE_DOCUMENT,
  59. XMLELEMTYPE_DTD,
  60. XMLELEMTYPE_PI,
  61. XMLELEMTYPE_OTHER
  62. } XMLELEM_TYPE;
  63. [
  64. local, object,
  65. uuid(65725580-9B5D-11d0-9BFE-00C04FC99C8E), // IID_IXMLElementCollection
  66. odl,
  67. dual,
  68. oleautomation,
  69. hidden, // replaced by IDOMNodeList
  70. helpstring("IXMLElementCollection helps to enumerate through a XML document tree.")
  71. ]
  72. interface IXMLElementCollection : IDispatch
  73. {
  74. [propput, restricted, hidden, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)] HRESULT length([in] long v);
  75. [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH), helpstring("get number of elements in this IXMLElementCollection.")] HRESULT length([retval, out] long * p);
  76. [propget, restricted, hidden, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)] HRESULT _newEnum([retval, out] IUnknown ** ppUnk);
  77. [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);
  78. };
  79. [
  80. local, object,
  81. uuid(F52E2B61-18A1-11d1-B105-00805F49916B), // IID_IXMLDocument
  82. odl,
  83. dual,
  84. oleautomation,
  85. hidden, // replaced by IDOMDocument
  86. helpstring("IXMLDocument loads and saves XML document. This is obsolete. You should use IDOMDocument or IXMLDOMDocument.")
  87. ]
  88. interface IXMLDocument : IDispatch
  89. {
  90. [propget, id(DISPID_XMLDOCUMENT_ROOT), helpstring("get root IXMLElement of the XML document.")] HRESULT root ([retval, out] IXMLElement * * p);
  91. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILESIZE)] HRESULT fileSize([retval, out] BSTR * p);
  92. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)] HRESULT fileModifiedDate([retval, out] BSTR * p);
  93. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)] HRESULT fileUpdatedDate([retval, out] BSTR * p);
  94. [propget, id(DISPID_XMLDOCUMENT_URL), helpstring("set URL to load an XML document from the URL.")] HRESULT URL([retval, out] BSTR * p);
  95. [propput, id(DISPID_XMLDOCUMENT_URL), helpstring("get url.")] HRESULT URL([in] BSTR p);
  96. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_MIMETYPE)] HRESULT mimeType([retval, out] BSTR * p);
  97. [propget, id(DISPID_XMLDOCUMENT_READYSTATE), helpstring("get ready state.")] HRESULT readyState([retval, out]long *pl);
  98. [propget, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("get encoding.")] HRESULT charset([retval, out]BSTR *p);
  99. [propput, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("set encoding.")] HRESULT charset([in]BSTR p);
  100. [propget, id(DISPID_XMLDOCUMENT_VERSION), helpstring("get XML version number.")] HRESULT version([retval, out]BSTR *p);
  101. [propget, id(DISPID_XMLDOCUMENT_DOCTYPE), helpstring("get document type.")] HRESULT doctype([retval, out]BSTR *p);
  102. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_DTDURL)] HRESULT dtdURL([retval, out]BSTR *p);
  103. [id(DISPID_XMLDOCUMENT_CREATEELEMENT), helpstring("create different types of IXMLElements.")] HRESULT createElement([in] VARIANT vType, [optional, in] VARIANT var1, [retval, out] IXMLElement * * ppElem);
  104. };
  105. [
  106. local, object,
  107. uuid(2B8DE2FE-8D2D-11d1-B2FC-00C04FD915A9), // IID_IXMLDocument2
  108. hidden // Because that this interface is the default interface of coclass XMLDocument
  109. ]
  110. interface IXMLDocument2 : IDispatch
  111. {
  112. [propget, id(DISPID_XMLDOCUMENT_ROOT), helpstring("get root IXMLElement of the XML document.")] HRESULT root ([retval, out] IXMLElement2 * * p);
  113. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILESIZE)] HRESULT fileSize([retval, out] BSTR * p);
  114. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)] HRESULT fileModifiedDate([retval, out] BSTR * p);
  115. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)] HRESULT fileUpdatedDate([retval, out] BSTR * p);
  116. [propget, id(DISPID_XMLDOCUMENT_URL), helpstring("set URL to load an XML document from the URL.")] HRESULT URL([retval, out] BSTR * p);
  117. [propput, id(DISPID_XMLDOCUMENT_URL), helpstring("get url.")] HRESULT URL([in] BSTR p);
  118. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_MIMETYPE)] HRESULT mimeType([retval, out] BSTR * p);
  119. [propget, id(DISPID_XMLDOCUMENT_READYSTATE), helpstring("get ready state.")] HRESULT readyState([retval, out]long *pl);
  120. [propget, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("get encoding.")] HRESULT charset([retval, out]BSTR *p);
  121. [propput, id(DISPID_XMLDOCUMENT_CHARSET), helpstring("set encoding.")] HRESULT charset([in]BSTR p);
  122. [propget, id(DISPID_XMLDOCUMENT_VERSION), helpstring("get XML version number.")] HRESULT version([retval, out]BSTR *p);
  123. [propget, id(DISPID_XMLDOCUMENT_DOCTYPE), helpstring("get document type.")] HRESULT doctype([retval, out]BSTR *p);
  124. [propget, restricted, hidden, id(DISPID_XMLDOCUMENT_DTDURL)] HRESULT dtdURL([retval, out]BSTR *p);
  125. [id(DISPID_XMLDOCUMENT_CREATEELEMENT), helpstring("create different types of IXMLElements.")] HRESULT createElement([in] VARIANT vType, [optional, in] VARIANT var1, [retval, out] IXMLElement2 * * ppElem);
  126. [propget, id(DISPID_XMLDOCUMENT_ASYNC), helpstring("get asynchronous loading flag.")] HRESULT async([retval, out] VARIANT_BOOL * pf);
  127. [propput, id(DISPID_XMLDOCUMENT_ASYNC), helpstring("set flag to turn on/off asynchronous loading.")] HRESULT async([in] VARIANT_BOOL f);
  128. };
  129. [
  130. local, object,
  131. uuid(3F7F31AC-E15F-11d0-9C25-00C04FC99C8E), // IID_IXMLElement
  132. odl,
  133. dual,
  134. oleautomation,
  135. hidden, // replaced by IDOMNode
  136. helpstring("IXMLElement represents an element in the XML document tree.")
  137. ]
  138. interface IXMLElement : IDispatch
  139. {
  140. [propget, id(DISPID_XMLELEMENT_TAGNAME), helpstring("get tag name.")] HRESULT tagName([retval, out] BSTR * p);
  141. [propput, id(DISPID_XMLELEMENT_TAGNAME), helpstring("set tag name.")] HRESULT tagName([in] BSTR p);
  142. [propget, id(DISPID_XMLELEMENT_PARENT), helpstring("get parent IXMLElement.")] HRESULT parent([retval, out]IXMLElement **ppParent);
  143. [id(DISPID_XMLELEMENT_SETATTRIBUTE), helpstring("set attribute.")] HRESULT setAttribute([in] BSTR strPropertyName,[in] VARIANT PropertyValue);
  144. [id(DISPID_XMLELEMENT_GETATTRIBUTE), helpstring("get attribute.")] HRESULT getAttribute([in] BSTR strPropertyName,[retval, out] VARIANT* PropertyValue);
  145. [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE), helpstring("remove attribute.")] HRESULT removeAttribute([in] BSTR strPropertyName);
  146. [propget, id(DISPID_XMLELEMENT_CHILDREN), helpstring("get a IXMLElementCollection of children.")] HRESULT children([retval, out] IXMLElementCollection * * pp);
  147. [propget, id(DISPID_XMLELEMENT_TYPE), helpstring("get type of this IXMLElement.")] HRESULT type([retval, out] long *plType);
  148. [propget, id(DISPID_XMLELEMENT_TEXT), helpstring("get text.")] HRESULT text([retval, out] BSTR *p);
  149. [propput, id(DISPID_XMLELEMENT_TEXT), helpstring("set text.")] HRESULT text([in] BSTR p);
  150. [id(DISPID_XMLELEMENT_ADDCHILD), helpstring("add a child.")] HRESULT addChild([in] IXMLElement *pChildElem, long lIndex, long lReserved); // lReserved must be -1
  151. [id(DISPID_XMLELEMENT_REMOVECHILD), helpstring("remove a child.")] HRESULT removeChild([in]IXMLElement *pChildElem);
  152. }
  153. [
  154. local, object,
  155. uuid(2B8DE2FF-8D2D-11d1-B2FC-00C04FD915A9), // IID_IXMLElement2
  156. odl,
  157. dual,
  158. oleautomation,
  159. hidden, // replaced by IDOMNode
  160. helpstring("IXMLElement2 extends IXMLElement.")
  161. ]
  162. interface IXMLElement2 : IDispatch
  163. {
  164. [propget, id(DISPID_XMLELEMENT_TAGNAME), helpstring("get tag name.")] HRESULT tagName([retval, out] BSTR * p);
  165. [propput, id(DISPID_XMLELEMENT_TAGNAME), helpstring("set tag name.")] HRESULT tagName([in] BSTR p);
  166. [propget, id(DISPID_XMLELEMENT_PARENT), helpstring("get parent IXMLElement.")] HRESULT parent([retval, out]IXMLElement2 **ppParent);
  167. [id(DISPID_XMLELEMENT_SETATTRIBUTE), helpstring("set attribute.")] HRESULT setAttribute([in] BSTR strPropertyName,[in] VARIANT PropertyValue);
  168. [id(DISPID_XMLELEMENT_GETATTRIBUTE), helpstring("get attribute.")] HRESULT getAttribute([in] BSTR strPropertyName,[retval, out] VARIANT* PropertyValue);
  169. [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE), helpstring("remove attribute.")] HRESULT removeAttribute([in] BSTR strPropertyName);
  170. [propget, id(DISPID_XMLELEMENT_CHILDREN), helpstring("get a IXMLElementCollection of all children.")] HRESULT children([retval, out] IXMLElementCollection * * pp);
  171. [propget, id(DISPID_XMLELEMENT_TYPE), helpstring("get type of this IXMLElement.")] HRESULT type([retval, out] long *plType);
  172. [propget, id(DISPID_XMLELEMENT_TEXT), helpstring("get text.")] HRESULT text([retval, out] BSTR *p);
  173. [propput, id(DISPID_XMLELEMENT_TEXT), helpstring("set text.")] HRESULT text([in] BSTR p);
  174. [id(DISPID_XMLELEMENT_ADDCHILD), helpstring("add a child.")] HRESULT addChild([in] IXMLElement2 *pChildElem, long lIndex, long lReserved); // lReserved must be -1
  175. [id(DISPID_XMLELEMENT_REMOVECHILD), helpstring("remove a child.")] HRESULT removeChild([in]IXMLElement2 *pChildElem);
  176. [propget, id(DISPID_XMLELEMENT_ATTRIBUTES), helpstring("get a IXMLElementCollection of all attributes.")] HRESULT attributes([retval, out] IXMLElementCollection ** pp);
  177. }
  178. [
  179. local, object,
  180. uuid(D4D4A0FC-3B73-11d1-B2B4-00C04FB92596), // IID_IXMLAttribute
  181. odl,
  182. dual,
  183. oleautomation,
  184. hidden, // replaced by IDOMNode
  185. helpstring("IXMLAttribute allows to get attributes of an IXMLElement.")
  186. ]
  187. interface IXMLAttribute : IDispatch
  188. {
  189. [propget, id(DISPID_XMLATTRIBUTE_NAME), helpstring("get attribute name.")] HRESULT name([retval, out] BSTR* n);
  190. [propget, id(DISPID_XMLATTRIBUTE_VALUE), helpstring("get attribute value.")] HRESULT value([retval, out] BSTR* v);
  191. };
  192. [
  193. local, object,
  194. uuid(948C5AD3-C58D-11d0-9C0B-00C04FC99C8E), // IID_IXMLError
  195. odl,
  196. hidden, // this is not scriptable.
  197. helpstring("Gets error info.")
  198. ]
  199. interface IXMLError : IUnknown
  200. {
  201. HRESULT GetErrorInfo(XML_ERROR *pErrorReturn);
  202. }
  203. // XML Document Class
  204. [
  205. uuid(CFC399AF-D876-11d0-9C10-00C04FC99C8E), // CLSID_XMLDocument
  206. 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.")
  207. ]
  208. coclass XMLDocument
  209. {
  210. [default] interface IXMLDocument2;
  211. }
  212. }