Excellent Guide To Xml Data-types

Excellent Guide To Xml Data-types

By:


Greetings, my name is Samantha Westwood. This is my '5 minute XML' series in which I provide you with steady byte size tutes.

The current subject is perfect for those people who are a new comer to XML.

No matter if a programming language is strongly typed or otherwise its essential that the data stored in an XML document is unambiguous. It must, therefore, be correctly specified.

If a utility reading data from an XML Editor file expects to locate, say an integer value portrayed from a particular elements opening and shutting tags then it is critical it discovers one there. A large raft of data-types is available for describing XML data objects:

Note: XML is an abbreviation for eXtensible Mark-up Language. It is just a mark-up language, not really a programming language. Its main objective is to explain a class of data objects called an XML Document. Files is really as complicated or as easy as is required.

The aforementioned XML data-type reference hierarchy demonstrates the built-in data-types and reveals logical derivation. Also, it is feasible to create user derived data-types from these. For an in depth appreciation of the various types listed please visit http://www.w3.org/TR/xmlschema-2/.

Specifying data-types meant for elements and attributes inside an XML data file are typically carried out in another file known as schema. Without the need of getting into schemas yet, lets just simply look at a few everyday data-type examples:

[invoice]

[orderDate]01-02-2011[/orderDate]

[shipDate]03-02-2011[/shipDate]

[billingAddress]

[name]Mr Ethereal[/name]

[street]1 My Street[/street]

[city]My City[/city]

[county]My County[/county]

[postcode]AB1 2CD[/postcode]

[/billingAddress]

[landline]0123 45678[/landline]

[fax]0123 45679[/fax]

[/invoice]

All the elements listed above suggests the kind of data that would generally be held at those data locations. It's critical that computer programs which are instructed to read and/or write to this specific resource are able to do so correctly, without having flagging I/O exceptions.

The naming of proper data-types is really a major part of why schemas are important. These will likely be presented in another 5 Minute XML tutorial.

However as a quick summary, an XML schema is seen as a set of rules or specification if you'd prefer, that a coder would probably use to spell out the structure of an XML document.

By way of example with a database schema will explain the data which can be contained in a database (table structure, data types, etc.) An XML Schema is really a lot the same for an XML document, it is effectively a rule set.

Many details are available on XML in case you choose to find out more. For the definitive guide, visit www.W3.org.

I really hope the above is helpful to another person visiting this blog. More content will probably be coming soon.














































About the Author:
Samantha Westwood is truly an knowledgeable practitioner in XML development and even XML standards and has plenty of working know-how about XML Editor and also sensible 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.