XML syntax

XML documents must contain a root element. All other elements must be nested within the root element.

All elements can have sub (children) elements. Elements with sub elements are also called Nodes.

<root>
…..<child>
……….<subchild>
……….</subchild>
…..</child>
</root>

A XML document should always have a XML declaration included. It defines the XML version and the character encoding used in the document.

<?xml version="1.0" encoding="utf-8" ?>

Unlike HTML, XML tags are case sensitive. E.g., the Tag <Root> is different from the Tag <root>

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.