Home arrow Java & J2EE arrow Page 2 - Integrating XML with J2EE

Benefits and Characteristics of XML - Java

In this article, Martin Bond discusses XML and its associated APIs and standards, and how XML can be used to create flexible structured data that is inherently portable. This excerpt is from chapter (Day) 16 of Teach Yourself J2EE in 21 Days, second edition, by Martin Bond, et. al. (Sams, ISBN: 0672325586)

  1. Integrating XML with J2EE
  2. Benefits and Characteristics of XML
  3. Structure and Syntax of XML
  4. Structure of an XML Document
  5. Well-formed XML Documents
  6. Namespaces
  7. Element Type Declarations
  8. XML Schemas
  9. Parsing XML
  10. Parsing XML Using SAX
  11. Document Object Model (DOM) Parser
  12. Modifying a DOM Tree
  13. Java Architecture for XML Binding
  14. Summary
By: Sams Publishing
Rating: starstarstarstarstar / 23
November 16, 2004

print this article



XML offers a method of putting structured data in a text file. Structured data is data that conforms to a particular format; examples are spreadsheets, address books, configuration parameters, and financial transactions. While being structured, XML is also readable by humans as well as software; this means that you do not need the originating software to access the data.

Origins of XML

XML was created by the World Wide Web Consortium (W3C) which now promotes and controls the standard. The W3C also promotes and develops a number of other interoperable technologies. The latest XML standard, along with lots of useful information and tools, can be obtained from the WC3 Web site (http://www.w3.org).

XML is a set of rules for designing text formats that describe the structure of your data. XML is not a programming language, so it is therefore easy for non-programmers to learn and use. In devising XML, the originators had a set of design goals, which were as follows:

  • XML should be straightforward to use over the Internet.

  • XML should support a wide variety of applications.

  • XML should be compatible with the Standard Generalized Markup Language.

  • It must be easy to write programs that process XML documents.

  • The number of optional features in XML should be kept to the absolute minimum—ideally, zero.

  • XML documents should be human-legible and reasonably clear.

  • XML documents should be easy to create.

  • Terseness in XML was of minimal importance.

XML is based on the Standard Generalized Markup Language (SGML). SGML is a powerful but complex meta-language that is used to describe languages for electronic document exchange, document management, and document publishing. HTML (probably the best known markup language) is an example of an SGML application. SGML provides a rich and powerful syntax, but its complexity has restricted its widespread use and it is used primarily for technical documentation.

XML was conceived as a means of retaining the power and flexibility of SGML while losing most of its complexity. Although a subset of SGML, XML manages to preserve the best parts of SGML and all of its commonly used features while being more regularly structured and easy to use.

XML is still a relatively young technology but it is fast making a significant impact. Already there is an important XML application—XHTML, the successor to HTML, which is now supported by most of the popular Web browsers.

This chapter is from Teach Yourself J2EE in 21 Days, second edition, by Martin Bond et. al. (Sams, 2004, ISBN: 0-672-32558-6). Check it out at your favorite bookstore today. Buy this book now.

>>> More Java & J2EE Articles          >>> More By Sams Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- More Java Bugs Lead to More Attacks
- Oracle's Java One Brings News, Surprises
- Oracle Patches Java Runtime Environment
- Apple Syncs Java Update with Oracle
- Spring 3.1 Java Development Framework Compat...
- Jelastic Java PaaS Availability and Pricing ...
- NetBeans 7.1 Released, Supports JavaFX 2
- SolarWinds Releases Newest Version of Java M...
- Free Monitoring Tool for Java Apps on Heroku
- Heroku Adds JCloud Platform Support, Java 7 ...
- Java SE 8 Speculation in Full Swing
- Java SE 7 Now Available
- New JVM Language and Java Reporting Tool
- Java 7 Release Update and New Eclipse Toolkit
- The Best Java Netbeans IDE Plugins

Developer Shed Affiliates


Dev Shed Tutorial Topics: