Java Reference
In-Depth Information
XML S CHEMAS
DTD's are the original XML specification language. However, there are a number
of limitations with this standard. As a result, newer, more expressive standards
have emerged. The most common is XML Schema, or XML Schema Definition
(XSD). This standard offers several improvements over DTD.
XSDs are themselves in XML format, and so they can be parsed by XML
parsers.
XSDs allow for namespaces , or the specification for where a particular (tag)
name is valid. This also allows a single name to be valid in more than one place.
XSDs allow for more validation rules than DTDs.
A UTHORING XML D OCUMENTS
In practice, you will not normally need to create XML documents by hand using
only a text editor. One possibility is that you will use an XML authoring tool. An
even more likely scenario is that you will write an application that generates valid
XML documents based on data from an existing system.
There are several good XML editing tools from a variety of sources, and some
are freely available. The XML site, www.xmls.com, contains an excellent list of
standalone XML editors, integrated DTD editors, and other very useful informa-
tion concerning XML software.
XML AND J AVA
Any programming language can create or process an XML document. Java is no ex-
ception. XML is not a specification of a programming language, nor is it a pro-
gramming language interface. Rather, it describes how an application can represent
data for the benefit of another application. As such, XML is very programming-lan-
guage neutral. For example, there are no predefined XML data types other than
quoted character strings.
Starting with Java 1.4, Sun provides implementations of the Java API for XML
Processing (JAXP) interface. This interface provides a means for Java applications to
read, write, parse, and transform XML documents. Individual implementations of the
JAXP interface are available, in addition to the version provided with the Java SDK.
JAXP provides three techniques to process XML documents: DOM, SAX,
and StAX.
 
Search WWH ::




Custom Search