gpt4 book ai didi

c++ - VC++6中的MSXML问题

转载 作者:行者123 更新时间:2023-11-28 03:57:26 25 4
gpt4 key购买 nike

我有这段代码:

typedef CComQIPtr<MSXML::IXMLDOMDocument2> XML_DocumentPtr;

然后在一些类中:

XML_DocumentPtr m_spDoc;

然后在一些函数中:

XML_NodePtr rn=m_spDoc->GetdocumentElement();

我在 MSDN 文档的任何地方都找不到 GetDocumentElement() 应该做什么?谁能告诉我为什么它似乎不是 IXMLDOMDocument2 接口(interface)的一部分?

哪个接口(interface)有它?

最佳答案

IXMLDocument2 继承自 IXMLDocumentGetDocumentElement() 方法在该接口(interface)中定义。参见 here .

基本上 GetdocumentElement 返回 XML 文档的根元素。

The property is read/write. It returns an IXMLDOMElement that represents the single element that represents the root of the XML document tree. It returns Null if no root exists.

When setting the documentElement property, the specified element node is inserted into the child list of the document after any document type node. To precisely place the node within the children of the document, call the insertBefore method of theIXMLDOMNode.

The parentNode property is reset to the document node as a result of this operation.

关于c++ - VC++6中的MSXML问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2950573/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com