Java and XML - Brett McLaughlin.pdf
(
5769 KB
)
Pobierz
Solutions to Real-World Problems
Java
& XML
TM
Brett D. McLaughlin & Justin Edelson
3
r
d
on
iti
Ed
Java
Java & XML
Java & XML,
Third Edition, shows you how to cut through all the hype about XML and
put it to work. It teaches you how to use the APIs, tools, and tricks of XML to build real-
world applications. The result is a new approach to managing information that touches
everything from configuration files to web sites.
After two chapters on XML basics, including XPath, XSL, DTDs, and XML Schema, the rest of the
book focuses on using XML from your Java applications. This third edition of
Java & XML
covers
all major Java XML processing libraries, including full coverage of the SAX, DOM, StAX, JDOM,
and dom4j APIs, as well as the latest version of the Java API for XML Processing (JAXP) and Java
Architecture for XML Binding (JAXB). The chapters on web technology have been entirely rewritten
to focus on today’s most relevant topics: syndicating content with RSS and creating Web 2.0
applications. You’ll learn how to create, read, and modify RSS feeds for syndicated content, and
how to use XML to power the next generation of web sites with Ajax and Adobe Flash.
Topics include:
•
•
•
•
•
•
•
•
The basics of XML, including DTDs, namespaces, XML Schema, XPath, and Transformations
The SAX API, including all handlers, filters, and writers
The DOM API, including DOM Level 2, Level 3, and the DOM HTML module
The JDOM API, including the core and a look at XPath support
The StAX API, including StAX factories, producing documents, and XMLPull
Data Binding with JAXB, using the new JAXB 2.0 annotations
Web syndication and podcasting with RSS
XML on the Presentation Layer, paying attention to Ajax and Flash applications
Java & XML
will be an indispensable companion if you are developing with Java and need to use
XML, or think that you will be in the future; if you’re involved in the new peer-to-peer movement,
messaging, or web services; or if you’re developing software for electronic commerce.
oreilly.com
US $49.99
CAN $64.99
ISBN: 978-0-596-10149-7
y(7IA5J6*LKLOTR( +,!&!;!}!}
THIRD EDITION
Java & XML
™
Brett D. McLaughlin and Justin Edelson
Beijing
•
Cambridge
•
Farnham
•
Köln
•
Sebastopol
•
Tokyo
Java
™
& XML
by Brett D. McLaughlin and Justin Edelson
Copyright © 2007, 2001, 2000 O’Reilly Media, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (safaribooksonline.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com.
Editor:
Mike Loukides
Production Editor:
Laurel R.T. Ruma
Copyeditor:
Linley Dolby
Proofreader:
Laurel R.T. Ruma
Printing History:
June 2000:
August 2001:
December 2006:
First Edition.
Second Edition.
Third Edition.
Indexer:
Ellen Troutman Zaig
Cover Designers:
Ellie Volckhausen and Karen
Montgomery
Interior Designer:
David Futato
Illustrators:
Robert Romano and Jessamyn Read
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc.
Java & XML,
the image of lions, and related trade dress are trademarks of O’Reilly
Media, Inc.
Java
™
and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc., in the United States and other countries.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein.
ISBN-10: 0-596-10149-X
ISBN-13: 978-0-596-10149-7
[LSI]
[6/2015]
Table of Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
1. Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
XML 1.0
XML 1.1
XML Transformations
And More...
1
9
10
19
2. Constraints
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
DTDs
XML Schema
RELAX NG
21
27
34
3. SAX
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
Setting Up SAX
Parsing with SAX
Content Handlers
Error Handlers
41
45
49
64
4. Advanced SAX
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
Properties and Features
Resolving Entities
Notations and Unparsed Entities
The DefaultHandler Class
Extension Interfaces
Filters and Writers
70
73
78
78
79
84
iii
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
J is for Judgment_nodrm.epub
(1891 KB)
J Francis Angier - Ready or Not Into the Wild Blue.azw3
(1617 KB)
j'ai perdu mon mari.epub
(8139 KB)
J Dillas Donuts - Jordan Ferguson.pdf
(408 KB)
J - Howard Jacobson.epub
(382 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin