Unit 9
Unit 9
SEMESTER
Unit 9: XML and Java
What is XML?
XML stands for “eXtensible Markup Language”. The notion of XML is based on something called
XML Document. XML is a simple text-based language which was designed to store and transport
data in plain text format.
What is an XML Document?
XML document is the way for storing data and information but uses a tree like structure. An XML
document/file comprises of several tags that represent the data or information. These tags are also
referred to as nodes.
Following is how a XML tag looks like: John In the tag, lastName is the name of the tag. Every
tag has a beginning and an end. All the characters or text in between represent the tag data The
good thing with XML is that, the tag names can be anything. However, there is just one rule that
we need to strictly follow. Rule: Every tag that is opened must be closed.
If the above rule is followed, then we say that the XML document as well formed. Following
shows a well formed XML document:
General rules