| About the Author |
|
xi | |
| About the Technical Reviewer |
|
xiii | |
| Acknowledgments |
|
xv | |
| Introduction |
|
xvii | |
| Part I: Exploring XML |
|
1 | (184) |
|
Chapter 1 Introducing XML |
|
|
3 | (32) |
|
|
|
3 | (2) |
|
|
|
5 | (12) |
|
|
|
5 | (2) |
|
|
|
7 | (3) |
|
Character References and CDATA Sections |
|
|
10 | (2) |
|
|
|
12 | (5) |
|
Comments and Processing Instructions |
|
|
17 | (1) |
|
|
|
17 | (1) |
|
|
|
18 | (16) |
|
|
|
19 | (7) |
|
|
|
26 | (8) |
|
|
|
34 | (1) |
|
Chapter 2 Parsing XML Documents with SAX |
|
|
35 | (32) |
|
|
|
35 | (1) |
|
|
|
36 | (11) |
|
|
|
36 | (1) |
|
Touring XMLReader Methods |
|
|
37 | (5) |
|
Touring the Handler and Resolver Interfaces |
|
|
42 | (5) |
|
Demonstrating the SAX API |
|
|
47 | (12) |
|
Creating a Custom Entity Resolver |
|
|
59 | (6) |
|
|
|
65 | (2) |
|
Chapter 3 Parsing and Creating XML Documents with DOM |
|
|
67 | (46) |
|
|
|
67 | (1) |
|
|
|
68 | (3) |
|
|
|
71 | (6) |
|
Obtaining a DOM Parser/Document Builder |
|
|
71 | (2) |
|
Parsing and Creating XML Documents |
|
|
73 | (4) |
|
Demonstrating the DOM API |
|
|
77 | (8) |
|
|
|
77 | (5) |
|
|
|
82 | (3) |
|
Working with Load and Save |
|
|
85 | (17) |
|
Loading an XML Document into a DOM Tree |
|
|
86 | (4) |
|
|
|
90 | (6) |
|
Filtering an XML Document While Parsing |
|
|
96 | (4) |
|
Saving a DOM Tree to an XML Document |
|
|
100 | (2) |
|
Working with Traversal and Range |
|
|
102 | (9) |
|
|
|
102 | (5) |
|
Performing Range Operations |
|
|
107 | (4) |
|
|
|
111 | (2) |
|
Chapter 4 Parsing and Creating XML Documents with StAX |
|
|
113 | (26) |
|
|
|
113 | (1) |
|
|
|
114 | (24) |
|
|
|
115 | (10) |
|
|
|
125 | (13) |
|
|
|
138 | (1) |
|
Chapter 5 Selecting Nodes with XPath |
|
|
139 | (26) |
|
|
|
139 | (1) |
|
|
|
139 | (6) |
|
Location Path Expressions |
|
|
140 | (3) |
|
|
|
143 | (2) |
|
|
|
145 | (9) |
|
|
|
154 | (10) |
|
|
|
154 | (2) |
|
Extension Functions and Function Resolvers |
|
|
156 | (5) |
|
Variables and Variable Resolvers |
|
|
161 | (3) |
|
|
|
164 | (1) |
|
Chapter 6 Transforming XML Documents with XSLT |
|
|
165 | (20) |
|
|
|
165 | (1) |
|
|
|
166 | (4) |
|
Demonstrating the XSLT API |
|
|
170 | (9) |
|
Going Beyond XSLT 1.0 and XPath 1.0 |
|
|
179 | (4) |
|
Downloading and Testing SAXON-HE 9.9 |
|
|
179 | (1) |
|
Playing with SAXON-HE 9.9 |
|
|
180 | (3) |
|
|
|
183 | (2) |
| Part II: Exploring JSON |
|
185 | (274) |
|
Chapter 7 Introducing JSON |
|
|
187 | (18) |
|
|
|
187 | (1) |
|
|
|
188 | (2) |
|
Demonstrating JSON with JavaScript |
|
|
190 | (5) |
|
|
|
195 | (7) |
|
|
|
202 | (3) |
|
Chapter 8 Parsing and Creating JSON Objects with mJson |
|
|
205 | (38) |
|
|
|
205 | (1) |
|
Obtaining and Using mJson |
|
|
206 | (1) |
|
|
|
206 | (36) |
|
|
|
207 | (6) |
|
Learning About Json Objects |
|
|
213 | (10) |
|
Navigating Json Object Hierarchies |
|
|
223 | (2) |
|
|
|
225 | (7) |
|
|
|
232 | (3) |
|
Customization via Factories |
|
|
235 | (7) |
|
|
|
242 | (1) |
|
Chapter 9 Parsing and Creating JSON Objects with Gson |
|
|
243 | (56) |
|
|
|
243 | (1) |
|
|
|
244 | (1) |
|
|
|
244 | (54) |
|
Introducing the Gson Class |
|
|
245 | (3) |
|
Parsing JSON Objects Through Deserialization |
|
|
248 | (10) |
|
Creating JSON Objects Through Serialization |
|
|
258 | (9) |
|
|
|
267 | (31) |
|
|
|
298 | (1) |
|
Chapter 10 Extracting JSON Values with JsonPath |
|
|
299 | (24) |
|
|
|
299 | (1) |
|
Learning the JsonPath Language |
|
|
300 | (4) |
|
Obtaining and Using the JsonPath Library |
|
|
304 | (2) |
|
Exploring the JsonPath Library |
|
|
306 | (15) |
|
Extracting Values from JSON Objects |
|
|
306 | (3) |
|
Using Predicates to Filter Items |
|
|
309 | (12) |
|
|
|
321 | (2) |
|
Chapter 11 Processing JSON with Jackson |
|
|
323 | (82) |
|
|
|
323 | (2) |
|
Obtaining and Using Jackson |
|
|
324 | (1) |
|
Working with Jackson's Basic Features |
|
|
325 | (25) |
|
|
|
325 | (9) |
|
|
|
334 | (6) |
|
|
|
340 | (10) |
|
Working with Jackson's Advanced Features |
|
|
350 | (52) |
|
|
|
350 | (40) |
|
|
|
390 | (8) |
|
Factory, Parser, and Generator Features |
|
|
398 | (4) |
|
|
|
402 | (3) |
|
Chapter 12 Processing JSON with JSON-P |
|
|
405 | (54) |
|
|
|
405 | (6) |
|
|
|
405 | (3) |
|
|
|
408 | (2) |
|
Obtaining and Using JSON-P |
|
|
410 | (1) |
|
|
|
411 | (12) |
|
Working with the Object Model API |
|
|
411 | (7) |
|
Working with the Streaming Model API |
|
|
418 | (5) |
|
Working with JSON-P 1.1's Advanced Features |
|
|
423 | (33) |
|
|
|
424 | (7) |
|
|
|
431 | (9) |
|
|
|
440 | (7) |
|
Editing/Transformation Operations |
|
|
447 | (2) |
|
|
|
449 | (7) |
|
|
|
456 | (3) |
| Part III: Appendixes |
|
459 | (60) |
|
Appendix A: Answers to Exercises |
|
|
461 | (58) |
|
Chapter 1 Introducing XML |
|
|
461 | (5) |
|
Chapter 2 Parsing XML Documents with SAX |
|
|
466 | (8) |
|
Chapter 3 Parsing and Creating XML Documents with DOM |
|
|
474 | (12) |
|
Chapter 4 Parsing and Creating XML Documents with StAX |
|
|
486 | (7) |
|
Chapter 5 Selecting Nodes with XPath |
|
|
493 | (4) |
|
Chapter 6 Transforming XML Documents with XSLT |
|
|
497 | (4) |
|
Chapter 7 Introducing JSON |
|
|
501 | (2) |
|
Chapter 8 Parsing and Creating JSON Objects with mJson |
|
|
503 | (3) |
|
Chapter 9 Parsing and Creating JSON Objects with Gson |
|
|
506 | (4) |
|
Chapter 10 Extracting JSON Values with JsonPath |
|
|
510 | (1) |
|
Chapter 11 Processing JSON with Jackson |
|
|
511 | (4) |
|
Chapter 12 Processing JSON with JSON-P |
|
|
515 | (4) |
| Index |
|
519 | |