Page

Library Books Records Using DTD in XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE LIBRARY [
<!ELEMENT LIBRARY (CONTENT*)>
<!ELEMENT CONTENT (BOOKID+)>
<!ELEMENT BOOKID (BOOKTITLE,BOOKNAME,BOOKAUTHOR,BOOKPUBLISHER,PUBLICATIONYEAR,BOOKPRICE,BOOKLOGO,BOOKSECTION,BOOKTYPE,BOOKEDITION)>
<!ELEMENT BOOKTITLE (#PCDATA)>
<!ELEMENT BOOKNAME (#PCDATA)>
<!ELEMENT BOOKAUTHOR (#PCDATA)>
<!ELEMENT BOOKPUBLISHER (#PCDATA)>
<!ELEMENT PUBLICATIONYEAR (#PCDATA)>
<!ELEMENT BOOKPRICE (#PCDATA)>
<!ELEMENT BOOKLOGO (SOURCE,HEIGHT,WEIGHT)>
<!ELEMENT SOURCE (#PCDATA)>
<!ELEMENT HEIGHT (#PCDATA)>
<!ELEMENT WEIGHT (#PCDATA)>
<!ELEMENT BOOKSECTION (#PCDATA)>
<!ELEMENT BOOKTYPE (#PCDATA)>
<!ELEMENT BOOKEDITION (#PCDATA)>

<!ENTITY xyz "LOVELY PROFESSIONAL UNIVERSITY">
<!ENTITY abc "XML DOCUMENTS OF LIBRARY BOOKS STORE SYSTEM ">
]>

<LIBRARY>
<BOOKID>
&xyz;
<BOOKTITLE>Operating system</BOOKTITLE>
<BOOKNAME>Windows xp</BOOKNAME>
<BOOKAUTHOR>Aasim</BOOKAUTHOR>
<BOOKPUBLISHER>Ram Publication</BOOKPUBLISHER>
<PUBLICATIONYEAR>1999</PUBLICATIONYEAR>
<BOOKPRICE>500</BOOKPRICE>
<BOOKLOGO>
<SOURCE>LPU Library</SOURCE>
<HEIGHT>20</HEIGHT>
<WEIGHT>10</WEIGHT>
</BOOKLOGO>
<BOOKSECTION>001</BOOKSECTION>
<BOOKTYPE>CSE</BOOKTYPE>
<BOOKEDITION>2000</BOOKEDITION>
</BOOKID>

<BOOKID>
&abc;
<BOOKTITLE>Operating system</BOOKTITLE>
<BOOKNAME>Windows 7</BOOKNAME>
<BOOKAUTHOR>Ram</BOOKAUTHOR>
<BOOKPUBLISHER>Ram Publication</BOOKPUBLISHER>
<PUBLICATIONYEAR>2000</PUBLICATIONYEAR>
<BOOKPRICE>400</BOOKPRICE>
<BOOKLOGO>
<SOURCE>LPU Library</SOURCE>
<HEIGHT>10</HEIGHT>
<WEIGHT>16</WEIGHT>
</BOOKLOGO>
<BOOKSECTION>002</BOOKSECTION>
<BOOKTYPE>CSE</BOOKTYPE>
<BOOKEDITION>2010</BOOKEDITION>
</BOOKID>


<BOOKID>
<BOOKTITLE>Operating system</BOOKTITLE>
<BOOKNAME>Windows 8</BOOKNAME>
<BOOKAUTHOR>Aasim</BOOKAUTHOR>
<BOOKPUBLISHER>Ram Publication</BOOKPUBLISHER>
<PUBLICATIONYEAR>1999</PUBLICATIONYEAR>
<BOOKPRICE>500</BOOKPRICE>
<BOOKLOGO>
<SOURCE>LPU Library</SOURCE>
<HEIGHT>20</HEIGHT>
<WEIGHT>10</WEIGHT>
</BOOKLOGO>
<BOOKSECTION>003</BOOKSECTION>
<BOOKTYPE>CSE</BOOKTYPE>
<BOOKEDITION>2000</BOOKEDITION>
</BOOKID>


</LIBRARY>

No comments:

Post a Comment