XML uses the same building blocks that HTML does: elements, attributes, and values.
An XML element is the most basic unit of your document.
An XML element can contain other elements and text.
An element has an opening tag with a name ( written between < and > ) and sometimes attributes.
The name should describe the element's purpose.
XML is self-describing
Bond
James
Hierarchies in XML
Bond
JK
James
is parent of , and .
, and are sibling.
Text is a child of the element.
The text Bond is a child of .
Bond
JK
James
element has only other elements, and not text, then it is said to have element content.
, , and have only text as children, they are said to have simple content.
Elements can contain both text and other elements(mixed content)
this is some text in my element
has three children:
A text child containing the text 'this is some' and an child.
Another text child containing the text inmyelement.