使用IXMLDOmDocument指针设置ProhibitDTD属性

Setting ProhibitDTD property using IXMLDOmDocument pointer

本文关键字:ProhibitDTD 属性 设置 指针 IXMLDOmDocument 使用      更新时间:2023-10-16

我使用IXMLDomDocument指针来加载我的XML。加载失败,说明禁止使用DTD。无法找到设置ProhibitDTD属性的函数。

的例子:

IXMLDOMDocument *pXMLDom = NULL;
CreateAndInitDOM(&pXMLDom);
{
   //succeeds
}
pXMLDom->load(varFileName, &varStatus);
{
   //fails: DTD is prohibited
}

我找不到任何函数来设置此属性。
如何将此属性设置为false

您必须使用IXMLDOMDocument2IXMLDOMDocument2Ptr