Home > Articles > Web Services > XML

  • Print
  • + Share This

XML and Semantic

It is important to realize that XML alone does not define the semantic (the meaning) of the document. The element names are meaningful only to humans. They are meaningless for the XML processor.

The processor does not know what a name is. And it does not know the difference between a name and an address, apart from the fact that an address has more children than a name. Although the element names are totally mixed up in Listing 2, for the XML processor, this is fine.

Listing 2 Meaningless names.

<?xml version="1.0"?>
      <street>John Doe</street> 
         <email>34 Fountain Square Plaza</email> 
      <tel preferred="true">513-744-8889</tel> 
      <address-book href="mailto:jdoe@emailaholic.com"/> 
      <street>Jack Smith</street>
      <address-book href="mailto:jsmith@emailaholic.com"/> 

The semantic of an XML document is provided by the application. Some XML companion standards deal with some aspects of semantic.

For example, XSL describes how to present information. It provides formatting semantic for a document. XLink and RDF (Resource Definition Framework) can be used to describe the relationships between documents.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.