Whether or not a programming language is strongly typed or otherwise it’s essential that the data held in an XML record is unambiguous. It has to, as a result, be correctly specified.
Hey there, i'm Michael Dupre. Here is my own '5 minute XML' series just where I feature frequent byte size guides.
The current topic area is perfect for those people that happen to be a new comer to XML.
Whether or not a programming language is strongly typed or otherwise it’s essential that the data held in an XML record is unambiguous. It has to, as a result, be correctly specified.
If an application looking at data from an XML doc expects to get, say an integer value expressed between a certain element’s opening and closing tags then it is important it detects one there. A wide host of data-types is out there for describing XML data objects:
Observe: XML is an abbreviation for eXtensible Mark-up Language. It is a mark-up language, not really programming language. Its objective is to outline for you a class of data objects titled an XML Document. Data files could be as complex or as elementary as becomes necessary.
The above mentioned XML data-type reference hierarchy demonstrates the built-in data-types and also displays logical derivation. It's also 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 designed for elements and attributes within the XML data file are all done in a different file known as a schema. Without getting into schemas just yet, let’s basically study some 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]
Every one of the elements right above suggests the kind of data that may generally be held at those data locations. It's critical that software programs which are instructed to read and/or write to this resource are able to do so effectively, without the need of flagging I/O exceptions.
The status of appropriate data-types is usually a major element of exactly why schemas are essential. These are going to be introduced in another 5 Minute XML tutorial.
Having said that as a quick overview, an XML schema is a set of rules or specification if you'd prefer, that the programmer would certainly utilise to spell out the structure of an XML document.
By way of example with a database schema will explain the data which might be within a database (table structure, data types, etc.) An XML Schema is noticeably the same for an XML document, it's effectively a rule set.
A great deal of details are available on XML for those who wish to know more. For the definitive guide, visit www.W3.org.
I hope the above is beneficial to somebody out there. More content might be coming shortly.
| Additional articles about xml editor |
|
|
| About the author |
Michael Dupre is an veteran practitioner in XML development and even XML standards and has loads of working knowledge of XML Editor in addition to useful know how with XML Schema.
|
| Please Rate This Article |
Number of ratings: 0
Rating: 0