Q2
XML with correct syntax is "Well Formed" XML.
XML validated against a DTD is "Valid" XML.
Q3
It is always a good idea to write a comment not only in XML but in all other programming language. comment help other users to understand the document with out going through the entiry document line by line. one of the great benfite of comment it saves time for the next programmer, which is trying to you XML docuement created by other programmers.
SECOND PART
< !DOCTYPE BOOK [
< !ELEMENT DOCUMENT(BOOK*) >
< !ELEMENT BOOK(Title,Author,Publisher,PageVerso,Copyright,ISBN,Chapter,Dedication*) >
< !ELEMENT Title (#PCDATA) >
< !ELEMENTAuthor (FName,LName) >
< !ELEMENT FName (#PCDATA) >
< !ELEMENT LNAME(#PCDATA) >
< !ELEMENT Publisher (Pname,Paddress) >
< !ELEMENT Pname (#PCDATA) >
< !ELEMENT Paddress (#PCDATA) >
< !ELEMENT PageVerso (#PCDATA) >
< !ELEMENT Copyright (#PCDATA) >
< !ELEMENT ISBN (#PCDATA) >
< !ELEMENT Chapter (Cno,Ctitle,Section) >
< !ELEMENT Cno (#PCDATA) >
< !ELEMENT Title (#PCDATA) >
< !ELEMENT Section (Sno,Stitle,Bodytext) >
< !ELEMENT Sno (#PCDATA) >
< !ELEMENT Stitle (#PCDATA) >
< !ELEMENT Bodytext (#PCDATA) >
] >
Today lesson was very trick I have learned that <:-/> is well formed Xml document. you can join the end tag and start tag with no value between and no root.
ReplyDelete< !ELEMENT publisheName "Anyone".) >
ReplyDeleteif I want to add fix vaule to element this is the way
need to lean more about DTD
ReplyDelete