What is XML Schema?

Showing Answers 1 - 3 of 3 Answers

vimazad

  • Feb 22nd, 2006
 

XML Schema is an XML based alternative to DTD

  Was this answer useful?  Yes

Divakar

  • Mar 14th, 2006
 

what is DTD?

  Was this answer useful?  Yes

Ranjith

  • Mar 17th, 2006
 

 Document Type Declaration(DTD)

<!DOCTYPE root-element [ doctype-declaration... ]>
determines the name of the root element and contains the document type declarations

Elements

Elements are the main building blocks of both XML and HTML documents.

Examples of HTML elements are "body" and "table". Examples of XML elements could be "note" and "message". Elements can contain text, other elements, or be empty. Examples of empty HTML elements are "hr", "br" and "img".

Examples:

<body>body text in between</body>
<message>some message in between</message>


Attributes

Attributes provide extra information about elements.

Attributes are always placed inside the starting tag of an element. Attributes always come in name/value pairs. The following "img" element has additional information about a source file:

<img src="computer.gif" />

The name of the element is "img". The name of the attribute is "src". The value of the attribute is "computer.gif". Since the element itself is empty it is closed by a " /".


Entities

Entities are variables used to define common text. Entity references are references to entities.

Most of you will know the HTML entity reference: "&nbsp;". This "no-breaking-space" entity is used in HTML to insert an extra space in a document. Entities are expanded when a document is parsed by an XML parser.

The following entities are predefined in XML:

Entity ReferencesCharacter
&lt;<
&gt;>
&amp;&
&quot;"
&apos;'

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions