- XML files start with this XML declaration tag:
<?xml version="1.0" encoding="UTF-8"?>
- An XML file has exactly one root note
- The employee1.xml file has exactly one root node:
<employees> ... </employees>
- A node consists of a start tag, and end tag, and everything in between.
The "everything in between"
is called the content of a node.
- A child node is a node contained inside another node called the parent node.
- The content can be child nodes, it can be text, or it can be empty.
- Here is a node where the content is text:
<firstname>Alice</firstname>
<firstname> is the start tag, </firstname> is the
end tag,
Alice is the content, which is text.
- An empty node has no content, for example:
<lastname></lastname>
- This empty node can be abbreviated as a combination start/end tag:
<lastname />