In contrast to the common misconception about XML, it's not actually a development language, it is a mark-up language, and as a result, probably the most easiest computer language around.
In contrast to the common misconception about XML,
it's not actually a development language, it is a mark-up language, and as a result, probably the most easiest computer language around.
XML is actually a non semantic language this means you are able to build your own element tags and in contrast to other languages there aren't any complex syntax structures to be concerned with. Because it isn’t a programming language, XML itself doesn’t actually do anything, by design, it’s really a storage container for data so it basically appears as very simple text on web pages or as a text file.
You may also employ XML to correctly display websites throughout different internet browsers and version types, to do that you should create separate formatting directions, referred to as DTD.s or Schemas.
Dealing with XML and designing basic files is in fact pretty straightforward when you can learn the basic principles, below is a quick look at nine of the most well-known XML words that you will run into.
1. XML (Extensible Mark-up Language
As already mentioned, xml is a markup language that serves as a container for the holding of data and allows data and information to be taken and displayed on the world-wide-web as web pages. Within XML their are also subsets of languages like XSL which helps in validation and formatting.
2. Element Tags
You can create and even name your element tags as you want and also to suit your own distinct wants. Element tags allow you to produce a hierarchical syntax and order to your code. As an illustration, let’s say it suited you to create a stock list of your complete stock items on your ecommerce bike shop website, you could use key tag names for instance product, and also inside the product tag element, one could have child elements like men’s bikes, women’s, child bikes and so on. The beauty and simpleness of XML is in being able to build your own element tags, just remember to close them.
- element tag
- closing tag
3. Declaration Statement
The declaration statement really should be at the beginning of your xml file, the reason for the declaration statement is to define the language, version and just to stipulate encoding and declare the standalone status of the file, without this the Internet processor will not be able to work out the code.
4. Root Element
The root element, like the name suggests is the very first named tag of every XML file and it's a holder for all other elements, that's why it is in the root.
- root element
5. Parent Element
The parent tag retains elements linked to the root, so in our illustration of products, the parent would be the associated categories or products.
- parent element
- element tag
6. Child Element
The child element is so named, simply because it belongs to the parent element and thus, rests inside it.
- root/parent element
- parent element
- child element
7. Attributes
An attribute is a label or value that sits inside the element tag, in our example an attribute could be frame size of the bicycle or the colour style.
- cube bike is the element and size is the attribute
8. Comments
Comments tend to be only viewable in the source and are also mainly for editors and authors who need to update or customize the xml file, comments are not seen on a webpage
9. Data Strings
A data string is the opposite of a comment in that it is viewable on the webpage, a data string in this specific context is the same as the description field.
- element tag
Full-range of cube cycles available. - data string viewable on a webpage
- closing tag
So that’s a brief and straightforward look at xml and also tips on how to create an xml file, to study more advanced material, you can search Google or check out this
xml tutorial.