Professional Documents
Culture Documents
Web Designing
Semester - III
• Introduction to XML
• XML Basics
• XML structure
• Viewing XML using Style Sheets
•Introduction to DTD
•Developing a DTD from XML code
•Viewing XML
•Data Binding
•XML using XML Data Source
• HTML • XML
foreword chapter
number="1"
– <?xml version="1.0"?>
– <novel>
– </novel>
• Web Pages
• Mathematical Equations
• Music Notation
• Vector Graphics
• Metadata
• and more…
• <?xml version="1.0"?>
• <!DOCTYPE note [ <!ELEMENT note
(to,from,heading,body)>
• <!ELEMENT to (#PCDATA)>
• <!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)> ]>
• <note>
• <to>Tove</to>
• <from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this
weekend!</body>
• </note>
• <?xml version="1.0"?>
• <!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
• <!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
• CDATA
• CDATA also means character data that is
not supposed to be parsed by a parser.
CDATA is text that will NOT be parsed by
a parser. Tags inside the text will NOT be
treated as markup and entities will not be
expanded.
• #CDATA means the element contains
character data
Copyright @ Amity University
Valid XML
• A DTD (Document Type Definition) defines what
tags are legal and where they can occur in the
XML
• An XML document does not require a DTD
• XML is well-structured if it follows the rules given
earlier
• In addition, XML is valid if it declares a DTD and
conforms to that DTD
• A DTD can be included in the XML, but is
typically a separate document
• Valid:
<GREETING>
various random text but no markup
</GREETING>
• Invalid: anything else including
<GREETING>
<sometag>various random
text</sometag>
<someEmptyTag/>
</GREETING>
Copyright @ Amity University
Validating Tools