I need a sample or tutorial on working with XML files. I want to create a file that contains a "record" to a person, something like this:
Name: Just Me Age: 99 EMail: [email protected]
I want to learn how to read and write an XML file.
I need a sample or tutorial on working with XML files. I want to create a file that contains a "record" to a person, something like this:
Name: Just Me Age: 99 EMail: [email protected]
I want to learn how to read and write an XML file.
Have a look at Jeroen Pluimers Sessions at CodeRage 4
called Practical XML in Delphi
"Starting with the XML basics, learn about well formed and valid documents, encoding, and recoding and XSD validation. See examples in Delphi for Win32 and Delphi Prism showing you which tool to choose when. Finally, learn where things can go wrong and how to prevent that: improper but well formed XML, copying data between XML documents, convert XML to tables and objects, etc."
This can get you up to speed in less than 10 minutes: http://www.youtube.com/watch?v=4D78MG4CaAI (a tutorial on using XML data binding wizard)
Wow, I just noticed this post after posting a tutorial of Xml serialization with Delphi 2010.
It can be looked at to see out TXmlDocument works, but there are many other methods that will work as well.
I typically use msXml unit directly as it exposes XPath which TXmlDocument does not.