Blogz
Sign in to join Michael Dupre's fan club.

A Basic XML Composition Utilizing Attributes

by Michael Dupre(1)


Hello there, I am Dennis Kaye. Introducing my '5 minute XML' series where by I deliver regular bite size tutorials.

The current subject is for people of you who are actually completely new to XML.

The up coming example displays a simple well formed XML file. It can easily be entered utilising a uncomplicated text editor or maybe any kind of of the XML editors now on the market. Whenever you are writing the document away the file-name should really finish with a .xml.

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

 [hairColour]

 Blonde

    [/hairColour]

[/human]

Typically the above [human] ... [/human] element has basically one other child element now. This time, the information retained in gender and born is actually made accessible utilizing attributes rather than of 'child elements'. Typically the order of the attributes doesn't matter however each should take the form attr="stuff", following the [elem] tag.

In the instance a good deal more than one attribute is employed, these have to be divided by whitespace and also each attribute needs to be unique for any one element. From this point people might possibly well ask, when should anyone place content inside an attribute as opposed to a child element? Certainly the response to this is not quite so clear as you would possibly suppose.

A number of groups think attributes are metadata related to the element, although elements really are for the information itself nonetheless you'll find it certainly not routinely apparent which is which I might encourage you to seek the advice of further resources advice, further than which common sense could overcome.

A plethora of information is available on XML just for those people who may like to know much more. For the definitive guide, visit www.W3.org.

Dennis Kaye is certainly a prominent specialist in XML coding and XML standards and offers above 15 years of working in the web standards and usability fields as well as within XML markup languages. Which is precisely why he is an expert with XML Editor and has practical know how with XML Schema Editor.


Article submitted Friday, June 17, 2011 & read 5 times.

Leave your comments through Blogz:


No comments yet.
2-0-0-0-2-ADSO
Copyright © 2012 IcoLogic, Inc.
Page viewed from Cache.
Page load time: 0.000 seconds.