0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MSXML

Last updated at Posted at 2019-10-22

c++でXMLを読み書きするためのメモ。

■XMLのパース
https://www.hiramine.com/programming/windows/msxmlload.html

■MSXML6.0のリファレンス
https://w.atwiki.jp/hakoniwa_project/pages/16.html

https://www.wikihouse.com/TakaraIzumo/index.php?msxml%A4%CB%A4%C4%A4%A4%A4%C6#content_1_3

■結局やりたいことに一番近いこと(でもMSXML6.0非対応?)
https://www.s34.co.jp/cpptechdoc/article/xml-persist/
http://funini.com/kei/vs/msxml.shtml

■c# + 外部ツール使えるなら。。。
https://qiita.com/Midoliy/items/58d56e202f104ebf867a

単純な出力すらできん。。。
よーわからん。。。

【期待値】

<AAA>
<BBB>
</BBB>
</AAA>

【結果】

【ソース】
IXMLDOMDocumentPtr pDoc("MSXML2.DOMDocument.6.0");
IXMLDOMProcessingInstructionPtr pPi;
pDoc->createProcessingInstruction(bstr_t("xml"), bstr_t("version='1.0' encoding='UTF-8'"), &pPi);
pDoc->appendChild(pPi, NULL);

IXMLDOMNodePtr pAAA;
VARIANT type;
type.uintVal = MSXML2::NODE_ELEMENT;
pDoc->createNode(type, bstr_t("AAA"), bstr_t(""), &pContent);
pDoc->appendChild(pContent, NULL);

IXMLDOMNodePtr pHeader;
pDoc->createNode(type, bstr_t("Header"), bstr_t(""), &pHeader);
pDoc->appendChild(pHeader, &pContent);

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?