1.项目中添加
#inport "MSXML4.dll"
using namespace MSXML2;
2.可以使用如下代码进行节点、属性等的添加
MSXML2::IXMLDOMDocumentPtr pDoc = NULL; //XML文档
MSXML2::IXMLDOMProcessingInstructionPtr pProInstruction = NULL; //XML申明
MSXML2::IXMLDOMCommentPtr pComment = NULL; //注释
MSXML2::IXMLDOMElementPtr pRootElement/*根节点*/ = NULL, pElement /*元素*/= NULL;
MSXML2::IXMLDOMNodePtr pNode = NULL, pNode1 = NULL, pNode2 = NULL; //节点
MSXML2::IXMLDOMAttributePtr pAttriNode = NULL; //属性
时间: 2024-10-05 22:27:45