Hi
I'm not a big fan of XML. I prefer JSON files, but sometimes you have no other option.
I've just been looking at some code that Veria Kalantary from "Ideas of East Company" sent me a while back.
It's a pretty solid implementation using MSXML (msxml6.dll), so I decided to port it to the current ObjAsm platform.
The code implements a reader, a writer and some ways to manipulate the node/element content in memory.
For those using other platforms, the code can be used as a starting point for your own implementation. :icon_idea:
I'd like to thank
Veria Kalantary for sharing his code. :thumbsup:
Attached is the complete test project (ObjAsm is required to compile it). The core file is called XmlDocument.inc, where the interface to the xml DLL is implemented.
The test project (wide string & 64 bit) performs the following steps:
- creates an in-memory instance
- creates and manipulates some nodes
- saves the instance to a file
- discards the in-memory data
- reloads the XML data into memory
- Creates a TreeView and displays the data
Regards, Biterider