A Great Introduction Of XML Data-types
Hi there, my name is Michael Dupre. Welcome to my very own '5 minute XML' series precisely where I provide you frequent byte size guides.
Today's topic area is perfect for folks that are a new comer to XML Editor.
No matter whether a programming language is strongly typed or otherwise it’s crucial that the data saved in an XML document is unambiguous. It ought to, therefore, be correctly specified. If an app searching data from an XML document expects to come across, say an integer value shown from a particular element’s beginning and shutting tags then it's essential it locates one there.
A large host of data-types is available for describing XML data objects:
Be aware: XML is an abbreviation for eXtensible Mark-up Language. This is a mark-up language, not really a programming language.
Its purpose commonly to describe a class of data objects known as an XML Document. Documents is often as intricate or so simple as is necessary.
The above mentioned XML data-type reference hierarchy demonstrates the built-in data-types and also will show logical derivation. Also, it is possible 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 within an XML computer file are commonly finished in a separate file known as schema. With no need of getting into schemas yet, let’s simply have a look at a number of 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]
Each one of the components listed above indicates the type of data that might ordinarily be held at those data locations. It is necessary that software programs which are expected to read and/or write to this specific resource are capable of doing so effectively, without any flagging I/O exceptions. The name of appropriate data-types can be a major element of exactly why schemas are important. These will be discussed in another 5 Minute XML tutorial.
Having said that as a fast overview, an XML schema is really a set of rules or specification if you'd prefer, that the programmer would certainly use to spell out the structure of an XML document. For instance with a database schema will describe the data that can be within a database (table structure, data types, etc.) An XML Schema is much the same for an XML document, it's effectively a rule set.
Loads of details are available on XML for people who want to find out more. For the definitive guide, visit www.W3.org.
Let's hope the above is helpful to anybody reading. More content is going to be on its way shortly.
Michael Dupre is an veteran guru in XML coding and XML standards and has loads of working expertise in XML Editor and also functional know how with XML Schema Editor.