Home > Articles > Programming > Java

Creating Applications with Java API for XML Parsing (JAXP)

  • Print
  • + Share This
Alex Pestrikov and Stephen Potts show you how to use JAXP to process XML. Learn how to parse an XML document and extract its information, how to parse the XML document using the JAXP's DOM approach, and how to create a real-world application that demonstrates how JAXP and XML could be used to facilitate distributed processing.
This chapter is from the book

This chapter is from the book

In This Chapter

  • Understanding XML

  • XML Related Tools

  • Creating an XML Document

  • Creating a Document Type Definition (DTD)

  • Parsing with the Simple API for XML (SAX)

  • Parsing with the Document Object Model (DOM)

  • An XML Version of the CruiseList Application

Most programs need to exchange data with other programs from time to time. Many techniques for making this exchange have been used over the years. Currently, the most popular approach to doing this is to create XML documents and transfer them to another computer where they can be parsed and the data processed.

Because XML documents are really text files, you can parse them any way that you like. Java programmers normally use the parsers that are found in the Java API for XML Parsing (JAXP). This chapter will introduce you to the use of these parsers.

XML is a set of rules that govern how you create a special language to describe your data. These rules provide a set of reserved characters and their usage in defining a set of tags that identify entities in your world. If you make up the tags according to the rules of XML, you will have access to a number of tools that will make parsing your data easier, once you are familiar with them. Getting you familiar with them is the main goal of this chapter.

  • + Share This
  • 🔖 Save To Your Account