Tuesday, 22 January 2013

XML Tags


XML Tags

Tags
XML tags are created like HTML tags. There's a start tag and a closing tag.
<TAG>content</TAG>
The closing tag uses a slash after the opening bracket, just like in HTML.
The text between the brackets is called an element.
Syntax
The following rules are used for using XML tags:
.. Tags are case sensitive. The tag <TRAVEL> differs from the tags <Travel> and
<travel>
.. Starting tags always need a closing tag
.. All tags must be nested properly
.. Comments can be used like in HTML: <!-- Comments -->
.. Between the starting tag and the end tag XML expects the content.
<amount>135</amount> is a valid tag for an element amount that has the content
135
Empty tags
Besides a starting tag and a closing tag, you can use an empty tag. An empty tag does
not have a closing tag.
The syntax differs from HTML: <TAG/>

No comments:

Post a Comment