Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to create XML using CDATASection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to create XML using CDATASection

 Post Reply Post Reply
Author
Message
bunei View Drop Down
Newbie
Newbie


Joined: 28 June 2012
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote bunei Quote  Post ReplyReply Direct Link To This Post Topic: How to create XML using CDATASection
    Posted: 20 April 2023 at 9:47pm
Hi All,

I'm using CXTPPropExchangeXMLNode to create XML.
I want to add a CDATA section to that XML.

CMyPropExchangeXMLNode px(FALSE, 0, "data");

struct XTPXML::IXMLDOMCDATASection* _result = 0;
_variant_t value = "<params>CDATA Section</params>";

CXTPDOMDocumentPtr xmlDocumentPtr = px.GetDocument();
HRESULT hr = xmlDocumentPtr->createCDATASection((_bstr_t)value, &_result);

CXTPDOMNodePtr xmlEntryPtr = px.GetEntryNode("www", TRUE);
XTPXML::IXMLDOMNode *pChildOut = NULL;
hr = xmlEntryPtr->appendChild((XTPXML::IXMLDOMNode*)_result, &pChildOut);
(hr = 0x80004005)
px.SaveToFile("test.xml");

How to create XML using CDATASection please.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.328 seconds.