⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmldom.idl

📁 本源码是vc环境下的usb程序
💻 IDL
📖 第 1 页 / 共 3 页
字号:
//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1998.
//
//  File: xmldom.idl
//
//--------------------------------------------------------------------------

#ifdef UNIX
import "ocidl.idl";
#endif

cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("//  Microsoft Windows")
cpp_quote("//  Copyright (C) Microsoft Corporation, 1998.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")

#include "xmldomdid.h"
#include <idispids.h>

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;
interface IXTLRuntime;



typedef [
helpstring("Constants that define a node's type")
] enum tagDOMNodeType 
{  
    NODE_INVALID, // = 0
    NODE_ELEMENT, // = 1
    NODE_ATTRIBUTE, // = 2
    NODE_TEXT, // = 3
    NODE_CDATA_SECTION, // = 4
    NODE_ENTITY_REFERENCE, // = 5
    NODE_ENTITY, // = 6
    NODE_PROCESSING_INSTRUCTION, // = 7
    NODE_COMMENT, // = 8
    NODE_DOCUMENT, // = 9
    NODE_DOCUMENT_TYPE, // = 10
    NODE_DOCUMENT_FRAGMENT, // = 11
    NODE_NOTATION // = 12
} DOMNodeType; 

[
    local, object,
    uuid(2933BF80-7B36-11d2-B20E-00C04F983E60), // IID_INode
    odl, 
    dual,
    oleautomation,
    nonextensible,
    helpstring("Core DOM node interface"),
    pointer_default(unique)
]
interface IXMLDOMNode : IDispatch
{
    // readonly attribute  wstring              nodeName;
    [propget, id(DISPID_DOM_NODE_NODENAME), 
     helpstring("name of the node")]
    HRESULT nodeName(
        [out, retval] BSTR * name);

    //          attribute  wstring              nodeValue;
    [propget, id(DISPID_DOM_NODE_NODEVALUE), 
     helpstring("value stored in the node")]
    HRESULT nodeValue(
        [out, retval] VARIANT * value);

    [propput, id(DISPID_DOM_NODE_NODEVALUE), 
     helpstring("value stored in the node")]
    HRESULT nodeValue(
        [in] VARIANT value);

    // readonly attribute  unsigned short       nodeType;
    [propget, id(DISPID_DOM_NODE_NODETYPE), 
     helpstring("the node's type")]
    HRESULT nodeType(
        [out, retval] DOMNodeType * type);

    // readonly attribute  Node                 parentNode;
    [propget, id(DISPID_DOM_NODE_PARENTNODE), 
     helpstring("parent of the node")]
    HRESULT parentNode(
        [out, retval] IXMLDOMNode ** parent);

    // readonly attribute  NodeList             childNodes;
    [propget, id(DISPID_DOM_NODE_CHILDNODES), 
     helpstring("the collection of the node's children")]
    HRESULT childNodes(
        [out, retval] IXMLDOMNodeList ** childList);

    // readonly attribute  Node                 firstChild;
    [propget,id(DISPID_DOM_NODE_FIRSTCHILD),
     helpstring("first child of the node")]
    HRESULT firstChild(
        [out, retval] IXMLDOMNode ** firstChild);

    // readonly attribute  Node                 lastChild;
    [propget,id(DISPID_DOM_NODE_LASTCHILD),
     helpstring("first child of the node")]
    HRESULT lastChild(
        [out, retval] IXMLDOMNode ** lastChild);

    // readonly attribute  Node                 previousSibling;
    [propget,id(DISPID_DOM_NODE_PREVIOUSSIBLING),
     helpstring("left sibling of the node")]
    HRESULT previousSibling(
        [out, retval] IXMLDOMNode ** previousSibling);

    // readonly attribute  Node                 nextSibling;
    [propget,id(DISPID_DOM_NODE_NEXTSIBLING),
     helpstring("right sibling of the node")]
    HRESULT nextSibling(
        [out, retval] IXMLDOMNode ** nextSibling);

    // readonly attribute  NamedNodeMap         attributes;
    [propget, id(DISPID_DOM_NODE_ATTRIBUTES), 
     helpstring("the collection of the node's attributes")]
    HRESULT attributes(
        [out, retval] IXMLDOMNamedNodeMap ** attributeMap);


    // Node                      insertBefore(in Node newChild, 
    //                                        in Node refChild)
    //                                        raises(DOMException);
    [id(DISPID_DOM_NODE_INSERTBEFORE),
     helpstring("insert a child node")]
    HRESULT insertBefore(
        [in] IXMLDOMNode * newChild,
        [in] VARIANT refChild,
        [out, retval] IXMLDOMNode ** outNewChild);

    // Node                      replaceChild(in Node newChild, 
    //                                        in Node oldChild)
    //                                        raises(DOMException);
    [id(DISPID_DOM_NODE_REPLACECHILD),
     helpstring("replace a child node")]
    HRESULT replaceChild(
        [in] IXMLDOMNode * newChild,
        [in] IXMLDOMNode * oldChild,
        [out, retval] IXMLDOMNode ** outOldChild);
  
    // Node                      removeChild(in Node childNode)
    //                                       raises(DOMException);
    [id(DISPID_DOM_NODE_REMOVECHILD),
     helpstring("remove a child node")]
    HRESULT removeChild(
        [in] IXMLDOMNode * childNode,
        [out, retval] IXMLDOMNode ** oldChild);

    // Node                      appendChild(in Node newChild);
    [id(DISPID_DOM_NODE_APPENDCHILD),
     helpstring("append a child node")]
    HRESULT appendChild(
        [in] IXMLDOMNode * newChild,
        [out, retval] IXMLDOMNode ** outNewChild);

    // boolean                   hasChildNodes();
    [id(DISPID_DOM_NODE_HASCHILDNODES),
     helpstring("")]
    HRESULT hasChildNodes(
        [out, retval] VARIANT_BOOL * hasChild);

    // readonly attribute  Node                 ownerDocument;
    [propget, id(DISPID_DOM_NODE_OWNERDOC), 
     helpstring("document that contains the node")]
    HRESULT ownerDocument(
        [out, retval] IXMLDOMDocument ** DOMDocument);

    // Node                      cloneNode(in boolean deep);
    [id(DISPID_DOM_NODE_CLONENODE),
     helpstring("")]
    HRESULT cloneNode(
        [in] VARIANT_BOOL deep,
        [out, retval] IXMLDOMNode ** cloneRoot);

    [propget, id(DISPID_XMLDOM_NODE_STRINGTYPE),
     helpstring("the type of node in string form")] 
    HRESULT nodeTypeString(
        [retval, out] BSTR * nodeType);

    [propget, id(DISPID_XMLDOM_NODE_TEXT),
     helpstring("text content of the node and subtree")] 
    HRESULT text(
        [retval, out] BSTR * text);

    [propput, id(DISPID_XMLDOM_NODE_TEXT),
     helpstring("text content of the node and subtree")] 
    HRESULT text(
        [in] BSTR text);

    [propget, id(DISPID_XMLDOM_NODE_SPECIFIED),
     helpstring("indicates whether node is a default value")]
    HRESULT specified(
        [out, retval] VARIANT_BOOL * isSpecified);

    // DTD Navigation.
    [propget, id(DISPID_XMLDOM_NODE_DEFINITION), 
     helpstring("pointer to the definition of the node in the DTD or schema")] 
    HRESULT definition(
        [retval,out] IXMLDOMNode ** definitionNode);

    [propget, id(DISPID_XMLDOM_NODE_NODETYPEDVALUE), 
     helpstring("get the strongly typed value of the node")] 
    HRESULT nodeTypedValue(
        [retval, out] VARIANT * typedValue);

    [propput, id(DISPID_XMLDOM_NODE_NODETYPEDVALUE), 
     helpstring("get the strongly typed value of the node")] 
    HRESULT nodeTypedValue(
        [in] VARIANT typedValue);

    [propget, id(DISPID_XMLDOM_NODE_DATATYPE), 
     helpstring("the data type of the node")] 
    HRESULT dataType(
        [retval, out] VARIANT * dataTypeName); // BSTR or VT_NULL

    [propput, id(DISPID_XMLDOM_NODE_DATATYPE), 
     helpstring("the data type of the node")] 
    HRESULT dataType(
        [in] BSTR dataTypeName);

    [propget, id(DISPID_XMLDOM_NODE_XML), 
     helpstring("return the XML source for the node and each of its descendants")] 
    HRESULT xml(
        [retval, out] BSTR * xmlString);

    [id(DISPID_XMLDOM_NODE_TRANSFORMNODE), 
     helpstring("apply the stylesheet to the subtree")] 
    HRESULT transformNode(
        [in] IXMLDOMNode * stylesheet,
        [retval, out] BSTR * xmlString);

    [id(DISPID_XMLDOM_NODE_SELECTNODES), 
     helpstring("execute query on the subtree")]
    HRESULT selectNodes(
        [in] BSTR queryString,
        [retval, out] IXMLDOMNodeList** resultList);

    [id(DISPID_XMLDOM_NODE_SELECTSINGLENODE), 
     helpstring("execute query on the subtree")]
    HRESULT selectSingleNode(
        [in] BSTR queryString,
        [retval, out] IXMLDOMNode** resultNode);

    [propget,id(DISPID_XMLDOM_NODE_PARSED), 
     helpstring("has sub-tree been completely parsed")]
	HRESULT parsed(
        [retval, out] VARIANT_BOOL * isParsed);

    [propget, id(DISPID_XMLDOM_NODE_NAMESPACE), 
     helpstring("the URI for the namespace applying to the node")] 
    HRESULT namespaceURI(
        [retval, out] BSTR * namespaceURI);

    [propget, id(DISPID_XMLDOM_NODE_PREFIX), 
     helpstring("the prefix for the namespace applying to the node")] 
    HRESULT prefix(
        [retval, out] BSTR * prefixString);

    [propget, id(DISPID_XMLDOM_NODE_BASENAME), 
     helpstring("the base name of the node (nodename with the prefix stripped off)")] 
    HRESULT baseName(
        [retval, out] BSTR * nameString);

    [id(DISPID_XMLDOM_NODE_TRANSFORMNODETOOBJECT), 
     helpstring("apply the stylesheet to the subtree, returning the result through a document or a stream")] 
    HRESULT transformNodeToObject(
        [in] IXMLDOMNode * stylesheet,
        [in] VARIANT outputObject);

};

[
    local, object,
    uuid(2933BF81-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMDocument
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMDocument : IXMLDOMNode 
{
    // readonly attribute  DocumentType         doctype;
    [propget, id(DISPID_DOM_DOCUMENT_DOCTYPE),
     helpstring("node corresponding to the DOCTYPE")]
    HRESULT doctype(
        [out, retval] IXMLDOMDocumentType ** documentType); 

    // readonly attribute  DOMImplementation    implementation;
    [propget, id(DISPID_DOM_DOCUMENT_IMPLEMENTATION),
     helpstring("info on this DOM implementation")]
    HRESULT implementation(
        [out, retval] IXMLDOMImplementation ** impl);

    // attribute  Element              documentElement;
    [propget, id(DISPID_DOM_DOCUMENT_DOCUMENTELEMENT),
     helpstring("the root of the tree")]
    HRESULT documentElement(
        [out, retval] IXMLDOMElement ** DOMElement);

    [propputref, id(DISPID_DOM_DOCUMENT_DOCUMENTELEMENT),
     helpstring("the root of the tree")]
    HRESULT documentElement(
        [in] IXMLDOMElement * DOMElement);

    // Element                   createElement(in wstring tagName);
    [id(DISPID_DOM_DOCUMENT_CREATEELEMENT),
     helpstring("create an Element node")]
    HRESULT createElement(
        [in] BSTR tagName,
        [out, retval] IXMLDOMElement ** element);

    // DocumentFragment          createDocumentFragment();
    [id(DISPID_DOM_DOCUMENT_CREATEDOCUMENTFRAGMENT),
     helpstring("create a DocumentFragment node")]
    HRESULT createDocumentFragment(
        [out, retval] IXMLDOMDocumentFragment ** docFrag );

    // Text                      createTextNode(in wstring data);
    [id(DISPID_DOM_DOCUMENT_CREATETEXTNODE),
     helpstring("create a text node")]
    HRESULT createTextNode(
        [in] BSTR data,
        [out, retval] IXMLDOMText ** text);

    // Comment                   createComment(in wstring data);
    [id(DISPID_DOM_DOCUMENT_CREATECOMMENT),
     helpstring("create a comment node")]
    HRESULT createComment(
        [in] BSTR data,
        [out, retval] IXMLDOMComment ** comment);

    // CDATASection              createCDATASection(in wstring data);
    [id(DISPID_DOM_DOCUMENT_CREATECDATASECTION),
     helpstring("create a CDATA section node")]
    HRESULT createCDATASection(
        [in] BSTR data,
        [out, retval] IXMLDOMCDATASection ** cdata);

    // ProcessingInstruction     createProcessingInstruction(in wstring target, 
    //                                                       in wstring data);
    [id(DISPID_DOM_DOCUMENT_CREATEPROCESSINGINSTRUCTION),
     helpstring("create a processing instruction node")]
    HRESULT createProcessingInstruction(
        [in] BSTR target,
        [in] BSTR data,
        [out, retval] IXMLDOMProcessingInstruction ** pi);

    // Attribute                 createAttribute(in wstring name);
    [id(DISPID_DOM_DOCUMENT_CREATEATTRIBUTE),
     helpstring("create an attribute node")]
    HRESULT createAttribute(
        [in] BSTR name,
        [out, retval] IXMLDOMAttribute ** attribute);

    // EntityReference           createEntityReference(in wstring name);
    [id(DISPID_DOM_DOCUMENT_CREATEENTITYREFERENCE),
     helpstring("create an entity reference node")]
    HRESULT createEntityReference(
        [in] BSTR name,
        [out, retval] IXMLDOMEntityReference ** entityRef);

    // NodeList                  getElementsByTagName(in wstring tagname);
    [id(DISPID_DOM_DOCUMENT_GETELEMENTSBYTAGNAME),
     helpstring("build a list of elements by name")]
    HRESULT getElementsByTagName(
        [in] BSTR tagName,
        [out, retval] IXMLDOMNodeList ** resultList);

    [id(DISPID_XMLDOM_DOCUMENT_CREATENODE), 
     helpstring("create a node of the specified node type and name")] 
    HRESULT createNode(
        [in] VARIANT Type, 
        [in] BSTR name, 
        [in] BSTR namespaceURI,
        [retval, out] IXMLDOMNode ** node);

    [id(DISPID_XMLDOM_DOCUMENT_NODEFROMID), 
     helpstring("retrieve node from it's ID")]
    HRESULT nodeFromID( 
        [in] BSTR idString,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -