Murach's Java Servlets and JSP

This chapter shows how to use Java to work with XML. In particular, it shows how to use Java to work with the Document Object Model (DOM), it shows how to code a servlet that stores an XML document in a file, and it shows how to code a servlet that returns an XML document to a browser.

Chapter 16 How to work with XML
An introduction to XML 466
An XML document 466
Common uses of XML 466
XML declarations and comments 468
XML elements 468
XML attributes 470
An introduction to DTDs 472
An introduction to XML APIs 474
How to work with DOM 476
The DOM tree 476
Interfaces for working with the DOM tree 478
How to create an empty DOM tree 480
How to add nodes to a DOM tree 482
How to write a DOM tree to a file 484
How to read a DOM tree from a file 486
How to read the nodes of a DOM tree 488
How to add, update, and delete nodes 490
The Email list application 492
The code for the XMLUtil class 492
The code for the UserXML class 494
The code for the EmailServlet class 496
How to return to an XML document via HTTP 498
The code for the XMLServlet class 498
The XML document displayed in a browser 498
t




Murach's Java Servlets and JSP

Learn more about this book

Add this book to your cart