XML is a way for storing structured data. Below there is a sample data represented by XML file.

Each well-formed XML document has to contains version of XML-standard it uses and single document element. Document element is a root item. All data must to be place under the document element.

XML comments should be placed into comment-blocks like this:

<!-- file: sample.xml -->
<?xml version="1.0"?>

<!-- our XML-document describes a purchase order -->


		<name>My name</name>
		<address>My address</address>

	<!-- a collection element, contains a set of items -->

			<label>Some music</label>

			<label>Some video</label>



Parent Category: Java SE Tips