XML
As-salam,
So we are going to introduce you about xml. Actualy we just know this topic yesterday. So we not know much about it. However we try our best to give a brief and understandable about XML.
So hope you all enjoy it. smile~
XML was designed to transport and store data.
HTML was designed to display data.
It also means :
XML actualy part of HTML. It is like HTML is a whole body. A Hands, ears, legs are XML.
Yet, both of it still have differences, which are :
- XML is not a replacement for HTML.
- XML was designed to transport and store data, with focus on what data is.
- HTML was designed to display data, with focus on how data looks.
But, remember..
We need to get cautious when writing the coding because XML have a rule.
XML syntax rule:
We need to get cautious when writing the coding because XML have a rule.
XML syntax rule:
- All XML Elements Must Have a Closing Tag.
- In HTML, you will often see elements that don't have a closing tag: –<p>This is a paragraph<p>This is another paragraph.
- In XML, it is illegal to omit the closing tag. All elementsmusthave a closing tag: –<p>This is a paragraph</p><p>This is another paragraph</p>.
Now..
I will try to explain you all about XML Element and Attributes with the table below.XML Element | XML Attributes |
An XML element is everything from (including) the element's start tag to (including) the element's end tag. | XML elements can have attributes in the start tag, just like HTML. |
An element can contain other elements, simple text or a mixture of both. | Attributes provide additional information about elements |
Elements can also have attributes | Attributes are handy in HTML |
This is example of XML Element and Attributes coding.
- In the first example sex is an attribute. In the last, sex is an element.
- Both examples provide the same information.
- There are no rules about when to use attributes and when to use elements.
- Attributes are handy in HTML.
So, if you need any detail about XML..You can visit http://en.wikipedia.org/wiki/XML.
Thank you for reading..
peace~
No comments:
Post a Comment