From DataFlex Wiki
Jump to navigationJump to search

XML: eXtensible Markup Language - is, like HTML, a sub-set of SGML - Standard Generalized Markup Language - itself a standardised form of [IBM's] [GML] - Generalized Markup Language.

XML is a general purpose markup language. It is generally used to store data in a standard way and is useful for exachanging data.

XML is commonly used as part of SOAP Web Services.

Here is an example of a simple XML file:

   <customer id=1>
     <name>Data Access</name>
   <customer id=2>
   <customer id=3>
     <name>Apple Computers</name>

Attributes and Elements

XML files are made up of Attributes and Elements. Elements are tags withing the XML file that contain values. For example:

 <name>Data Access</name>

This is an Element called name which has a value of "Data Access". Elements are generally used to store the data being held in an XML file.

Attributes are values which are associated with an element. For example:

 <customer id=2>

The attribute id belongs to the customer element and the value of the attribute is 2. Data stored in attributes are generally used to allow easy processing of the XML file. In this example having an id element allows you to easily find the customer element using a FindNode function.

Using XML with Visual DataFlex

External Links