A simple element is an XML element that can contain only text.
Example: a bookstore may define the <TITLE> tag to mean the title of a book, contained only within the <BOOK> element. A directory of people, however, might define <TITLE> to indicate a person's position, for instance: <TITLE>President</TITLE>. Namespaces help define this distinction clearly.
Note: a) Every namespace has a unique name which is a string. To maintain the uniqueness among namespaces a IRL is most preferred approach, since URLs are unique.
b) Except for no-namespace Schemas, every XML Schema uses at least two namespaces:
1.the target namespace.
2. The XMLSchema namespace (http://w3.org/2001/XMLSchema)
There are two ways to use namespaces:
ElementFormDefault indicates whether or not locally declared elements must be qualified by the target namespace in an instance document. ElementFormDefault attribute in the Schema has the following relevance:
An XML parser is a piece of software which can do following:
Note: Parser is piece of software provided by vendors. An XML parser is built in Java runtime from JDK 1.4 onwards
SAX-Simple API for XML processing. SAX provides a mechanism for reading data from an XML document. It is a popular alternative to the Document Object Model (DOM).SAX provides an event based processing approach unlike DOM which is tree based.