Hour 21. Reading and Writing XML Data

What You’ll Learn in This Hour:

• Reading XML from a file

• Extracting XML elements

• Collecting a set of child elements

• Reading attribute values for an XML element

• Writing an XML file

The rise to prominence of Java in the 1990s coincided with another dramatic change in the development of computer software: the introduction of Extensible Markup Language (XML). XML, a format for organizing and storing data so that it can be read by any program, has become ginormous, to borrow my kids’ favorite adjective.

Thanks to XML, data can be read and written independently of the software used to create it. This is a welcome change from the bad old days when every program seemed to have its own proprietary and idiosyncratic format.

XML data can be read with a parser, a program that recognizes the format and can extract portions of the data as needed.

During this hour, you read and write XML data using the XML Object Model (XOM), a Java class library that makes it easy to work with XML data in Java programs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.213.238