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

📄 xmldom.idl

📁 本源码是vc环境下的usb程序
💻 IDL
📖 第 1 页 / 共 3 页
字号:
        [retval, out] IXMLDOMNode ** node);

    [id(DISPID_XMLDOM_DOCUMENT_LOAD), 
     helpstring("load document from the specified XML source")] 
    HRESULT load(
        [in] VARIANT xmlSource,
        [out, retval] VARIANT_BOOL * isSuccessful);

    [propget, id(DISPID_READYSTATE), 
     helpstring("get the state of the XML document")] 
    HRESULT readyState(
        [retval, out] long * value);

    [propget, id(DISPID_XMLDOM_DOCUMENT_PARSEERROR), 
     helpstring("get the last parser error")] 
    HRESULT parseError(
        [retval, out] IXMLDOMParseError ** errorObj);

    [propget, id(DISPID_XMLDOM_DOCUMENT_URL), 
     helpstring("get the URL for the loaded XML document")] 
    HRESULT url(
        [retval, out] BSTR * urlString);

    [propget, id(DISPID_XMLDOM_DOCUMENT_ASYNC), 
     helpstring("flag for asynchronous download")] 
    HRESULT async(
        [retval, out] VARIANT_BOOL * isAsync);

    [propput, id(DISPID_XMLDOM_DOCUMENT_ASYNC), 
     helpstring("flag for asynchronous download")] 
    HRESULT async(
        [in] VARIANT_BOOL isAsync);

    [id(DISPID_XMLDOM_DOCUMENT_ABORT), 
     helpstring("abort an asynchronous download")] 
    HRESULT abort();

    [id(DISPID_XMLDOM_DOCUMENT_LOADXML), 
     helpstring("load the document from a string")] 
    HRESULT loadXML( 
        [in] BSTR bstrXML,
        [out, retval] VARIANT_BOOL * isSuccessful);

    [id(DISPID_XMLDOM_DOCUMENT_SAVE), 
     helpstring("save the document to a specified desination")] 
    HRESULT save( 
        [in] VARIANT desination);

    [propget, id(DISPID_XMLDOM_DOCUMENT_VALIDATE), 
     helpstring("indicates whether the parser performs validation")] 
    HRESULT validateOnParse(
        [retval, out] VARIANT_BOOL * isValidating);

    [propput, id(DISPID_XMLDOM_DOCUMENT_VALIDATE), 
     helpstring("indicates whether the parser performs validation")] 
    HRESULT validateOnParse(
        [in] VARIANT_BOOL isValidating);

    [propget, id(DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE),
     helpstring("indicates whether the parser resolves references to external DTD/Entities/Schema")]
    HRESULT resolveExternals(
        [retval,out] VARIANT_BOOL * isResolving);

    [propput, id(DISPID_XMLDOM_DOCUMENT_RESOLVENAMESPACE),
     helpstring("indicates whether the parser resolves references to external DTD/Entities/Schema")]
    HRESULT resolveExternals(
        [in] VARIANT_BOOL isResolving);

    [propget, id(DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE),
     helpstring("indicates whether the parser preserves whitespace")]
    HRESULT preserveWhiteSpace(
        [retval,out] VARIANT_BOOL * isPreserving);

    [propput, id(DISPID_XMLDOM_DOCUMENT_PRESERVEWHITESPACE),
     helpstring("indicates whether the parser preserves whitespace")]
    HRESULT preserveWhiteSpace(
        [in] VARIANT_BOOL isPreserving);

    [propput, id(DISPID_XMLDOM_DOCUMENT_ONREADYSTATECHANGE), 
     helpstring("register a readystatechange event handler")]
    HRESULT onreadystatechange(
        [in] VARIANT readystatechangeSink);
 
    [propput, id(DISPID_XMLDOM_DOCUMENT_ONDATAAVAILABLE), 
     helpstring("register an ondataavailable event handler")]
    HRESULT ondataavailable(
        [in] VARIANT ondataavailableSink);

    [propput, id(DISPID_XMLDOM_DOCUMENT_ONTRANSFORMNODE), 
     helpstring("register an ontransformnode event handler")]
    HRESULT ontransformnode(
        [in] VARIANT ontransformnodeSink);
};


[
    local, object,
    uuid(2933BF82-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMNodeList
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMNodeList : IDispatch
{
    // Node                      item(in unsigned long index);
    [propget, id(DISPID_VALUE),
     helpstring("collection of nodes")]
    HRESULT item(
        [in] long index,
        [out, retval] IXMLDOMNode ** listItem);

    // readonly attribute  unsigned long        length;
    [propget, id(DISPID_DOM_NODELIST_LENGTH),
     helpstring("number of nodes in the collection")]
    HRESULT length(
        [out, retval] long * listLength);

    [id(DISPID_XMLDOM_NODELIST_NEXTNODE),
     helpstring("get next node from iterator")]
    HRESULT nextNode(
        [out, retval] IXMLDOMNode ** nextItem);

    [id(DISPID_XMLDOM_NODELIST_RESET),
     helpstring("reset the position of iterator")]
    HRESULT reset();

    [propget, restricted, hidden, 
     id(DISPID_NEWENUM)] 
    HRESULT _newEnum(
        [retval, out] IUnknown ** ppUnk);
};


[
    local, object,
    uuid(2933BF83-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMNamedNodeMap
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMNamedNodeMap : IDispatch
{
    // Node                      getNamedItem(in wstring name);
    [id(DISPID_DOM_NAMEDNODEMAP_GETNAMEDITEM),
     helpstring("lookup item by name")]
    HRESULT getNamedItem(
        [in] BSTR name,
        [out, retval] IXMLDOMNode ** namedItem);

    // void                      setNamedItem(in Node arg);
    [id(DISPID_DOM_NAMEDNODEMAP_SETNAMEDITEM),
     helpstring("set item by name")]
    HRESULT setNamedItem(
        [in] IXMLDOMNode * newItem,
        [out, retval] IXMLDOMNode ** nameItem);

    // Node                      removeNamedItem(in wstring name);
    [id(DISPID_DOM_NAMEDNODEMAP_REMOVENAMEDITEM),
     helpstring("remove item by name")]
    HRESULT removeNamedItem(
        [in] BSTR name,
        [out, retval] IXMLDOMNode ** namedItem);

    // Node                      item(in unsigned long index);
    [propget, id(DISPID_VALUE),
     helpstring("collection of nodes")]
    HRESULT item(
        [in] long index,
        [out, retval] IXMLDOMNode ** listItem);

    // readonly attribute  unsigned long        length;
    [propget, id(DISPID_DOM_NODELIST_LENGTH),
     helpstring("number of nodes in the collection")]
    HRESULT length(
        [out, retval] long * listLength);

    // Node                      getQualifiedItem(in wstring name,in Node namespace);
    [id(DISPID_XMLDOM_NAMEDNODEMAP_GETQUALIFIEDITEM),
     helpstring("lookup the item by name and namespace")]
    HRESULT getQualifiedItem(
        [in] BSTR baseName,
        [in] BSTR namespaceURI,
        [out, retval] IXMLDOMNode ** qualifiedItem);

    // Node                      removeQualifiedItem(in wstring name,in Node namespace);
    [id(DISPID_XMLDOM_NAMEDNODEMAP_REMOVEQUALIFIEDITEM),
     helpstring("remove the item by name and namespace")]
    HRESULT removeQualifiedItem(
        [in] BSTR baseName,
        [in] BSTR namespaceURI,
        [out, retval] IXMLDOMNode ** qualifiedItem);

    [id(DISPID_XMLDOM_NAMEDNODEMAP_NEXTNODE),
     helpstring("get next node from iterator")]
    HRESULT nextNode(
        [out, retval] IXMLDOMNode ** nextItem);

    [id(DISPID_XMLDOM_NAMEDNODEMAP_RESET),
     helpstring("reset the position of iterator")]
    HRESULT reset();

    [propget, restricted, hidden, 
     id(DISPID_NEWENUM)] 
    HRESULT _newEnum(
        [retval, out] IUnknown ** ppUnk);
};


[
    local, object,
    uuid(3efaa413-272f-11d2-836f-0000f87a7782), // IID_IXMLDOMDocumentFragment
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMDocumentFragment : IXMLDOMNode 
{
};


[
    local, object,
    uuid(2933BF84-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMCharacterData
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMCharacterData : IXMLDOMNode 
{
    //          attribute  wstring              data;
    [propget, id(DISPID_DOM_DATA_DATA),
     helpstring("value of the node")]
    HRESULT data(
        [out, retval] BSTR * data);

    [propput, id(DISPID_DOM_DATA_DATA),
     helpstring("value of the node")]
    HRESULT data(
        [in] BSTR data);
    
    // readonly attribute  unsigned long        length;
    [propget, id(DISPID_DOM_DATA_LENGTH),
     helpstring("number of characters in value")]
    HRESULT length(
        [out, retval] long * dataLength);

    // wstring                   substring(in unsigned long offset, 
    //                                     in unsigned long count)
    //                                     raises(DOMException);
    [id(DISPID_DOM_DATA_SUBSTRING),
     helpstring("retrieve substring of value")]
    HRESULT substringData(
        [in] long offset,
        [in] long count,
        [out, retval] BSTR * data);

    // void                      append(in wstring arg);
    [id(DISPID_DOM_DATA_APPEND),
     helpstring("append string to value")]
    HRESULT appendData(
        [in] BSTR data);

    // void                      insert(in unsigned long offset, 
    //                                  in wstring arg)
    //                                  raises(DOMException);
    [id(DISPID_DOM_DATA_INSERT),
     helpstring("insert string into value")]
    HRESULT insertData(
        [in] long offset,
        [in] BSTR data);

    // void                      delete(in unsigned long offset, 
    //                                  in unsigned long count)
    //                                  raises(DOMException);
    [id(DISPID_DOM_DATA_DELETE),
     helpstring("delete string within the value")]
    HRESULT deleteData(
        [in] long offset,
        [in] long count);

    // void                      replace(in unsigned long offset, 
    //                                   in unsigned long count, 
    //                                   in wstring arg)
    //                                   raises(DOMException);
    [id(DISPID_DOM_DATA_REPLACE),
     helpstring("replace string within the value")]
    HRESULT replaceData(
        [in] long offset,
        [in] long count,
        [in] BSTR data);
};


[
    local, object,
    uuid(2933BF85-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMAttribute
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMAttribute : IXMLDOMNode 
{
    // wstring                   name;
    [propget, id(DISPID_DOM_ATTRIBUTE_GETNAME),
     helpstring("get name of the attribute")]
    HRESULT name(
        [out, retval] BSTR * attributeName);

    //         attribute  boolean              specified;
    // ! This is defined as an extended property on IXMLDOMNode

    // attribute wstring                   value;
    [propget, id(DISPID_DOM_ATTRIBUTE_VALUE),
     helpstring("string value of the attribute")]
    HRESULT value(
        [out, retval] VARIANT * attributeValue);

    [propput, id(DISPID_DOM_ATTRIBUTE_VALUE),
     helpstring("string value of the attribute")]
    HRESULT value(
        [in] VARIANT attributeValue);
};


[
    local, object,
    uuid(2933BF86-7B36-11d2-B20E-00C04F983E60), // IID_IXMLDOMElement
    odl, 
    dual,
    oleautomation,
    nonextensible,
    pointer_default(unique)
]
interface IXMLDOMElement : IXMLDOMNode 
{
    // readonly attribute wstring                   tagName;
    [propget, id(DISPID_DOM_ELEMENT_GETTAGNAME),
     helpstring("get the tagName of the element")]
    HRESULT tagName(
        [out, retval] BSTR * tagName);

    // wstring                   getAttribute(in wstring name);
    [id(DISPID_DOM_ELEMENT_GETATTRIBUTE),
     helpstring("look up the string value of an attribute by name")]
    HRESULT getAttribute(
        [in] BSTR name,
        [out, retval] VARIANT * value);

    // void                      setAttribute(in string name, 
    //                                        in string value);
    [id(DISPID_DOM_ELEMENT_SETATTRIBUTE),
     helpstring("set the string value of an attribute by name")]
    HRESULT setAttribute(
        [in] BSTR name,
        [in] VARIANT value);

    // void                      removeAttribute(in wstring name);
    [id(DISPID_DOM_ELEMENT_REMOVEATTRIBUTE),
     helpstring("remove an attribute by name")]
    HRESULT removeAttribute(
        [in] BSTR name);

    // Attribute                 getAttributeNode(in wstring name);
    [id(DISPID_DOM_ELEMENT_GETATTRIBUTENODE),
     helpstring("look up the attribute node by name")]
    HRESULT getAttributeNode(
        [in] BSTR name,
        [out, retval] IXMLDOMAttribute ** attributeNode);

    // void                      setAttributeNode(in Attribute newAttr);
    [id(DISPID_DOM_ELEMENT_SETATTRIBUTENODE),
     helpstring("set the specified attribute on the element")]
    HRESULT setAttributeNode(
        [in] IXMLDOMAttribute * DOMAttribute,
        [out, retval] IXMLDOMAttribute ** attributeNode);

    // void                      removeAttributeNode(in Attribute oldAttr);
    [id(DISPID_DOM_ELEMENT_REMOVEATTRIBUTENODE),
     helpstring("remove the specified attribute")]
    HRESULT removeAttributeNode(
        [in] IXMLDOMAttribute * DOMAttribute,
        [out, retval] IXMLDOMAttribute ** attributeNode);

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

    // void                      normalize();
    [id(DISPID_DOM_ELEMENT_NORMALIZE),
     helpstring("collapse all adjacent text nodes in sub-tree")]

⌨️ 快捷键说明

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