View RSS Feed

My Java Tips

XML Prolog

Rating: 1 votes, 1.00 average.
by , 11-01-2011 at 05:15 PM (1304 Views)
Developer who are working with XML, should know about XML prolog. This post will brief you about the said topic.


Its an optional component of the XML document. If you wish to include it, then it must appear before the root element. A prolog consists of two parts:

Part 1 comprises of XML declaration
Part 2 comprises of Document Type Declaration (DTD)

You can include both depending on your needs.

Example:

<!--?xml version="1.0"?-->
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<root>
<!-- some tags here-->
...
</root>

Submit "XML Prolog" to Facebook Submit "XML Prolog" to Digg Submit "XML Prolog" to del.icio.us Submit "XML Prolog" to StumbleUpon Submit "XML Prolog" to Google

Tags: None Add / Edit Tags
Categories
XML

Comments