#import "msxml6.dll"
using namespace MSXML2;
//把XML文档读写到字符串中去
void Test2()
{
MSXML2::IXMLDOMDocumentPtr doc;
HRESULT hr = doc.CreateInstance(__uuidof(MSXML2::DOMDocument60),0);
VARIANT_BOOL bRet = doc->load(_bstr_t(L"uu.xml"));
//读入XML字符串
_bstr_t bs = L"<aa><bb attr1='hello'>world</bb></aa>";
doc->loadXML(bs);
//写入XML字符串
_bstr_t bs_get = doc->Getxml();
}
posted on 2009-05-23 11:04
鹿哥 阅读(292)
评论(0) 编辑 收藏 引用