Write an XML file that displays book information with the following fields: Title of the book, Author Name, ISBN number, Publisher name, Edition, and Price. Define a Document Type Definition (DTD) to validate the XML document created above.

PHOTO EMBED

Sat Nov 02 2024 17:02:53 GMT+0000 (Coordinated Universal Time)

Saved by @cpbab #xml

books.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookstore SYSTEM "bookstore.dtd">
<bookstore>
    <book>
        <title>Introduction to XML</title>
        <author>John Doe</author>
        <isbn>978-0-123456-47-2</isbn>
        <publisher>Example Press</publisher>
        <edition>3rd</edition>
        <price>39.99</price>
    </book>
    <book>
        <title>Advanced XML Concepts</title>
        <author>Jane Smith</author>
        <isbn>978-0-765432-10-5</isbn>
        <publisher>Tech Books Publishing</publisher>
        <edition>1st</edition>
        <price>45.00</price>
    </book>
</bookstore>

bookstore.dtd
<!ELEMENT bookstore (book+)>
<!ELEMENT book (title, author, isbn, publisher, edition, price)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT price (#PCDATA)>
content_copyCOPY