Nov 11, 2011

Structure of XML Document

1. Structure of an XML document:
An XML document contains the following parts:
1. Prologue
2. Root element
3. Epilogue


XML documents must start with an XML declaration.
An XML declaration:
Looks like a processing instruction with the xml name

Is optional in XML 1.0 but mandatory in XML 1.1
Must contain the version attribute
May (optionally) include the following:
Encoding attribute
standalone attribute

An XML document contains the following parts:
The prologue, which may contain the following information:
XML declaration (optional in XML 1.0, mandatory in XML 1.1)
Document type definition (DTD), which is required only to validate the document structure
Processing instructions and comments, which are optional
The root element, which is also called the “document element” and contains all other elements
An epilogue, which contains processing instructions and comments
Processing instructions give commands or information to an application that processes the XML data.
Processing instructions have the format , where target is the name of the application that is expected to do the processing, and the instructions consist of a string of characters that embodies the information or commands for the application to process.
Processing instructions can be written in the prologue, epilogue, or root element of an XML document.

No comments:

OraApps Search

Custom Search

Search This Blog