19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

for the first line <strong>to</strong> obtain information about the document so that it<br />

can be processed correctly.<br />

<br />

Line 2 is a <strong>com</strong>ment for documenting the contents in the file. XML<br />

<strong>com</strong>ment always begins with .<br />

<br />

Lines 3-4 specifies the version of XHTML used in the document. This can<br />

be used by the Web browser <strong>to</strong> validate the syntax of the document.<br />

<br />

<br />

An XML document consists of elements described by tags. An element is<br />

enclosed between a start tag and an end tag. XML elements are organized<br />

in a tree-like hierarchy. Elements may contain subelements, but there is<br />

only one root element in an XML document. All the elements must be<br />

enclosed inside the root tag. The root element in XHTML is defined using<br />

the html tag (line 5).<br />

Each tag in XML must be used in a pair of the start tag and the end tag.<br />

A starting begins with < followed by the tag name, and ends with >. An<br />

end tag is the same as its starting except it begins with

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!