0% found this document useful (0 votes)
40 views2 pages

SAX Practice

The document provides an XML file containing book data including ID, category, name, author, ISBN, price, number sold, and stock for 4 books. It also includes a figure showing a sample UI for searching the books by name, ID, or category. A Java program needs to be written to implement this UI and allow searching of the books data.

Uploaded by

Nguyen Minh Nhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

SAX Practice

The document provides an XML file containing book data including ID, category, name, author, ISBN, price, number sold, and stock for 4 books. It also includes a figure showing a sample UI for searching the books by name, ID, or category. A Java program needs to be written to implement this UI and allow searching of the books data.

Uploaded by

Nguyen Minh Nhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Give the following XML about books collection.

Write java program with the UI look like figure 1. User


can be search by book name, book ID or a list of books with category.

Figure 1

<?xml version="1.0"?>
<Books>
<Book id="0001" Category="novel">
<Name>Harry Potter and the philosopher stone</Name>
<Author>J.K Rowling</Author>
<ISBN>978-3-16-148410-0</ISBN>
<Price>18.5</Price>
<Sold>21</Sold>
<Stock>17</Stock>
</Book>

<Book id="0002" Category="Programming">


<Name>XML in a Nutshell, Third Edition</Name>
<Author>W. Scott Means</Author>
<ISBN>978-0-59-600764-5</ISBN>
<Price>31.8</Price>
<Sold>84</Sold>
<Stock>147</Stock>
</Book>

<Book id="0003" Category="Programming">


<Name>Core Java Volume I-Fundamentals</Name>
<Author>Cay S. Horstmann</Author>
<ISBN>978-0137081899</ISBN>
<Price>11.96</Price>
<Sold>37</Sold>
<Stock>15</Stock>
</Book>
<Book id="0004" Category="Science">
<Name>A Brief History of Time</Name>
<Author>Stephen Hawking</Author>
<ISBN>978-0-55-338016-3</ISBN>
<Price>16.25</Price>
<Sold>126</Sold>
<Stock>49</Stock>
</Book>
</Books>

You might also like