开发者

Where is a tutorial for using XML with Delphi? [closed]

开发者 https://www.devze.com 2022-12-08 13:15 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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: me@some.net开发者_C百科

I want to learn how to read and write an XML file.


See Creating, Parsing and Manipulating XML Documents with Delphi


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.


I use this VCL component:

NativeXML

Edit:

NativeXml is currently open-sourced.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号