XML in C ++ Builder 6

How can I use XML as a simple data warehouse in Borland C ++ Builder 6?

Is there an inner class that I could use?

thanks for the help

+4
source share
2 answers

I'm not sure if TXmlDocument is TXmlDocument in C ++ Builder 6, but a simpler solution would be to use TinyXML [1] , which is really simple and easy to use. I used it with different versions of C ++ Builder and it works like a charm.

[1] http://www.grinninglizard.com/tinyxml/

+5
source

use nativexml


 xmlDoc = new TNativeXml("test"); xmlDoc->EncodingString = "GB2312" ; xmlDoc->XmlFormat = xfReadable; xmlNode = xmlDoc->Root->NodeNew("report") ; xmlNode->WriteString("date","2008-6-8") ; xmlNode->WriteString("road0","10") ; xmlNode->WriteString("road1","8") ; xmlNode = xmlDoc->Root->NodeNew("ctrParm") ; xmlNode->WriteString("parm0","0") ; xmlNode->WriteString("parm1","1") ; xmlNode->WriteString("parm2","2") ; xmlDoc->SaveToFile("test.xml") ; delete xmlDoc ; 
0
source

Source: https://habr.com/ru/post/1300848/


All Articles