Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

XML Concepts : Page 2

XML is way of marking up data, adding metadata, and separating structure from formatting and style. Web pages are just one of many uses for XML.


advertisement

Structure
XML applies structure to documents. Documents are sets of related information.

The term structure seems to bring some unpleasant imagery with it, especially for creative souls who want to make this medium work in new and innovative ways. But when one is dealing with publishing, the term structure is quite positive. It is the way we put a skeleton behind information, so that the pieces of information work together and make sense as a whole.

There are two key principles behind a structured model:



  1. Each part—or element—has a relationship with other elements. This series of relationships defines the structure.
  2. The meaning of the element is separate from its visual appearance.

Documents
We can't really talk about structure without first talking a bit about documents. Document is another of those terms that conjures up somewhat negative images; one tends to picture "dusty stacks of documents" or "attorney's documents" or "document processing." But in this case, a document is simply a collection related information.

For example, this page is a document. Your favorite 'zine is set of documents. Your intranet is probably comprised of hundreds if not thousands of documents.

Sometimes documents are created as a single unit. Sometimes they are built on demand, pulling pieces from a database and assembling into a document as the reader requests. In both cases, structure makes the document easier to create, maintain, and display.

Document Structure
The document structure defines the elements which make up a document, the information you want to collect about those elements, and the relationship those elements have to each other. You use XML to markup the document, following the structure you have decided upon.

By treating a document as a collection of elements, you free it from the constraints of time, place, and presentation format. You can move the structured document from a word processor to a PDA to a Web browser. The structure is intact on each; you just alter the display characteristics for each device.

The document structure is called the document tree. The main trunk of the tree is the parent. All the branches and leaves are children. Document trees are usually visually represented as a hierarchal chart.

Structure vs. Format
The most important thing to remember about a structured document is that it is defined by the elements it contains, not by how it looks.

Structure says that an element is a paragraph. Format says to display the paragraph in 12 point Times.

Structure says the element is a book title. Format says to display the book title in green bold body text.

Structure say the element is a social security number. Format says to hide and not display the social security number.

Learning to separate structure from format is critical in making good use of XML.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date