100% found this document useful (1 vote)
71 views

Creating, Parsing and Manipulating XML Documents With Delphi

This document provides an overview of XML and how it can be used with Delphi applications. It defines XML as a universal language for structured data exchange. The document discusses how XML organizes information and describes data using tags, and how it can be used to exchange data between systems like a mini database. It then outlines several ways XML can be integrated into Delphi apps using the TXMLDocument component to read, create, parse and manipulate XML documents. Examples provided include exporting/importing a treeview to XML, reading RSS feeds, and exporting/importing database tables to XML.

Uploaded by

jitugoua13122018
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
71 views

Creating, Parsing and Manipulating XML Documents With Delphi

This document provides an overview of XML and how it can be used with Delphi applications. It defines XML as a universal language for structured data exchange. The document discusses how XML organizes information and describes data using tags, and how it can be used to exchange data between systems like a mini database. It then outlines several ways XML can be integrated into Delphi apps using the TXMLDocument component to read, create, parse and manipulate XML documents. Examples provided include exporting/importing a treeview to XML, reading RSS feeds, and exporting/importing database tables to XML.

Uploaded by

jitugoua13122018
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Creating, Parsing and Manipulating XML Documents with

Delphi

What is XML?

XML is the 'Extensible Markup Language', universal language for data on the Web. XML gives
developers the power to deliver structured data from a wide variety of applications to the desktop
for local computation and presentation. XML is also an ideal format for server-to-server transfer of
structured data. Using an XML parser, software is able to walk through the hierarchy of the
document extracting the structure of the document, its content, or both. XML is in no way limited
to Internet use. In fact, XML's main strength - organizing information - makes it perfect for
exchanging data between different systems.

XML looks much like HTML. However, whereas HTML describes the layout of a page (for data
displaying purposes) XML is concerned with defining and describing data, it describes the type of
content. Hence, 'extensible' because it is not a fixed format like HTML.
We can also think of each XML file as a mini database. Tag, or markups (the text surrounded by
angle brackets) in an XML document delineate the records and fields. The text between the tags is
the data. We perform operations like retrieving, updating, and inserting data with XML using a
parser and a set of objects exposed by the parser.

As a Delphi programmer, what you need to know is how to use XML. Therefore, in this article I'll
be presenting several ways in which XML can be integrated into your Delphi applications.

Doing XML with Delphi

Delphi provides a wrapper component designed to read, create and parse XML
documents: TXMLDocument.

Here's a list of XML related articles and tips:

Exporting TreeView to XML. Constructing a TreeView from XML


Here's how to store TTreeView component items to XML (preserving the Text and other properties
of a tree node) and how to populate a TreeView from an XML file.
Simple Reading and manipulating RSS feeds files with Delphi
Learn how to read and manipulate XML documents with Delphi using the TXMLDocument
component. Let's see how to extract the most current "In The Spotlight" blog entries (RSS feed)
from the About Delphi Programming (this site).
Database table to XML and back
Creating XML files from Paradox (or any DB) tables using Delphi. See how to export the data from
a table to a XML file and how to import that data back to the table.
How to create, use and free TXMLDocument dynamically (without an AV)
Delphi tip: If you need to work with dynamically created TXMLDocument component, you might be
getting access violations once you try to Free the object. Here's what to do ...
How to Create the !DocType and ?XML Elements using TXmlDocument
Delphi's implementation of the TXMLDocument component, which basically uses Microsoft XML
parser by default, does not provide a way to add a node of the "ntDocType" (TNodeType type).
Here's how to solve this problem.

You might also like