Add Delphi and XML


Extensible Markup Language, or XML, is a simplified version of SGML. It is currently receiving a lot of attention. XML is essentially a markup language, meaning that it uses symbols to describe its own content. It also enables you to identify and organize your information in a more accurate and flexible way. This article is the first in a four-part series that introduces you to using XML with Delphi and the DOM.

With XML, tags consist of specially defined text enclosed in angle brackets. It is extensible because it is not a fixed format, in contrast to HTML, which has predefined markers. For example, if you want text to appear italic in HTML, you place that text between <em></em> tags. Every browser knows what to do when they encounter these tags. If however, you change these tags to say, "<ems></ems>," browsers would not know what to do, since they are only programmed to recognize the "<em></em>" tags.

In contrast to this, XML does not have any predefined tags and allows you to create your own tag sets to both display and format text. All you have to do is  add a (XSL) stylesheet to enable the browser to format your text. This language can therefore be read and understood on any computer platform.

An XML document is basically a plain text file. Below is an example of and XML File:


<?xml version="1.0" encoding="iso-8859-1"?>

<?xml-stylesheet type="text/xsl" href="generic.xsl"?>

<!-- Copy and paste the url into your newsreader application" -->

<!-- generator="Movable Type/2.64" -->

<rss version="0.91">

<channel>

<item>

<title>Sample Title </title>

<link>http://www.mysite.com</link>

<description> All Website should have an RSS feed. Really??</description>

</item>

 

<item>

<title>XML in Focus</title>

<link>http://www.mysite.com</link>

<description>. In this case, tags consisting of specially defined text enclosed in angle brackets. The reason why it is extensible is because it is not a fixed format </description>

</item>

<item>

<title>Extensible Mark Up Language</title>

<link>http://www.mysite.com</link>

<description>A new language that is taking the IT world by storm </description>

</item>

</channel>

</rss>
Related Discussions
  • HOW TO KILL ANYOTHER PROGRAMS WITH DELPHI? (2001-01-02 19:04:42)
    Find the handle of the window using FindWindow or EnumWindows and use PostMessage(ProgramHandle, WM_CLOSE, 0, 0); I have not tried it, but it...
  • HOW TO GREP CHARACTERS IN DELPHI 3 (2001-01-03 03:29:32)
    Var Grep : String; Begin Grep := Copy('2000-46',6,2); End; The first parameter is a string or a dynamic array, the second is the index of...
  • HOW CAN I DEBUG DLL (2001-01-03 02:48:24)
    Do you mean how to find internal errors while writing a DLL file or how to get the exact error while calling a DLL Function ? /Filip
  • USING DLLS (2001-01-04 01:47:50)
    Hi again Goober ... :o) Let's take NETAPI32.DLL as an example. This DLL is created by Microsoft and the explanation of its use is described in...
  • DOT ON SCREEN (2001-01-03 05:42:55)
    Delphi does not support a Pixel function with a HDC, you have to use the Windows-API-function COLORREF SetPixel( HDC hdc, // handle...
  • HOW TO RUN DATABASE APPLICATION ON THE INTERNET (2017-06-09 10:54:22)
    Well, in design I think there is already an issue. Backend is more then just a database with which you connect. There should be a complete layer...
  • HELP WITH CHDIR !!!! TURBO PASCAL VS DELPHI (2001-01-03 08:48:49)
    This is because the ChDir Procedure, the SetCurrentDir and SetCurrentDirectory Functions are changing the directory in the active process. Try...
  • FRIENDS IN DELPHI ?? (OR OTHER ACCESS WORKAROUNDS) (2001-01-04 11:08:37)
    One of the quirks of Delphi is that classes in the same unit can access protected and private methods and variables. Borland does this a lot in...
  • SENDING ICQ MSGS FROM DELPHI (2001-01-03 16:54:03)
    I tried the ICQ Api, but never used it. I've added a simple ICQPager component to delphipages (Winsock/TCPIP).. it might help... Q
  • RUNNING A DATABASE APPLICATION ON ANOTHER COMPUTER (2001-01-07 07:36:33)
    In the BDE on the other PC (the one without the database), you must add an alias to point to the location of the database in the format of:...
Latest News
Submit News Form Past News
Latest Forum Entries