A Easy Xml Structure Making Use Of Attributes

By:


Hey, i'm Claire Reynolds. Introducing my '5 minute XML' series where by I deliver regular bite size tutorials.

Today's subject matter is intended for people of you who are new to XML.

The ensuing example reveals a effortless well formed XML file. It can easily be entered working with a easy text editor or maybe just about any of the XML editors now that are available. When you are crafting the documentation away the file-name need to cease with a .xml.

[human gender="male" born="18 July 1990"]

[hairColour]

Blonde

[/hairColour]

[/human]

The actual above [human] ... [/human] element carries basically 1 other child element now. This moment, the actual information stored in gender and born is actually made accessible utilizing attributes instead of 'child elements'. The order of the attributes won't matter nonetheless each ought to take the form attr="stuff", right after the [elem] tag.

Anywhere much more than one attribute is utilised, these should be separated by whitespace not to mention each and every attribute have to be unique regarding any one element. During this point anyone could well inquire, when must anyone place content inside an attribute instread of a child element? Actually the answer to this is not necessarily quite so clear as you might think.

Several groups assume attributes are metadata regarding the element, whilst elements really are for the information itself nevertheless it is actually not really essentially clear which is which I'd suggest you to consult with additional resources direction, further than which common sense could triumph.

A wide range of information is available on XML intended for people who would like to know more.

Notice: XML is an abbreviation for eXtensible Mark-up Language. It's a mark-up language, not really programming language. Its goal is usually to describe a class of data objects called an XML Document. Files can be as complicated or as simple as is needed. Loads of information is available on XML for individuals who would choose to learn more. For the definitive guide, visit www.W3.org.

























About the Author:
Claire Reynolds is without a doubt a most recognized specialist in XML coding and XML standards and has more than 15 years of working in the web standards and usability fields including within XML markup languages. Which is the key reason why he is an expert with XML Editor and has practical know how with XML Schema Editor.



Article Originally Published On: http://www.articlesnatch.com


|

Loading...
Related....
Videos...

Recent Software Articles

Comments

Still can't find what you are looking for? Search for it!

Loading

Copyright 2005-2011 ArticleSnatch, LLC - All Rights Reserved.
Privacy Policy | Terms of Service.