VC中的MSXML问题++ 6
我有这段代码:
typedef CComQIPtr<MSXML::IXMLDOMDocument2> XML_DocumentPtr;
然后在某个类中:
XML_DocumentPtr m_spDoc;
然后在某个函数中:
XML_NodePtr rn=m_spDoc->GetdocumentElement();
我在 MSDN 文档中找不到 GetDocumentElement()
应该做什么?谁能告诉我为什么它似乎不是 IXMLDOMDocument2
接口的一部分?
哪个接口有它?
I have this bit of code:
typedef CComQIPtr<MSXML::IXMLDOMDocument2> XML_DocumentPtr;
then inside some class:
XML_DocumentPtr m_spDoc;
then inside some function:
XML_NodePtr rn=m_spDoc->GetdocumentElement();
I cannot find anywhere in the MSDN documentation what that GetDocumentElement()
is supposed to do? Can anyone tell me why it doesn't seem to be part of IXMLDOMDocument2
interface?
And which interface does have it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IXMLDocument2
继承自IXMLDocument
。GetDocumentElement()
方法是在该接口中定义的。请参阅此处。基本上,
GetdocumentElement
返回 XML 文档的根元素。IXMLDocument2
inherits fromIXMLDocument
. TheGetDocumentElement()
method is defined in that interface. See here.Basically
GetdocumentElement
returns the root element of the XML document.GetdocumentElement
返回文档的根元素,如果不存在根元素,则返回 NULL。GetdocumentElement
returns the root element of the document or NULL if no root exists.