


Chapter 7 defines key terms, walks through JSON syntax, demonstrates JSON in a JavaScript context (because Java SE does not officially support JSON), and shows how to validate JSON objects (through the JSON Schema Validator online tool). The remaining five chapters explore Java SE's SAX, DOM, StAX, XPath, and XSLT apis. Chapter 1 defines key terms, introduces XML language features (XML declarations, elements and attributes, character references and CDATA sections, namespaces, comments and processing instructions), and introduces XML document validation (through document type definitions and schemas). Part 3: Appendix Appendix A: Practice Answers.Chapter 12: Working with JSON using JSON-p.Chapter 10: Extracting JSON values using JsonPath.Chapter 9: Parsing and creating JSON objects using Gson.Chapter 8: Parsing and creating JSON objects using mJson.Chapter 6: Transform XML documents using XSLT.Chapter 4: Parsing and creating XML documents using StAX.Chapter 3: Parsing and creating XML documents using the DOM.Chapter 2: Parsing XML Documents with SAX.Java XML and JSON version 2 is divided into three parts, including 12 chapters and appendices: The second edition, recently released by Apress, provides new content and (hopefully) answers more questions about XML, JSON, Java SE's XML API, and various JSON apis, including JSON-P. The first edition of Java XML and JSON (June 2016) introduced XML and JSON, explored Java SE's own XML-oriented apis, and explored external JSON-oriented apis for Java SE. When XML came along, and then JSON, this technology greatly simplified my life. I use the debugger to identify data field types, file offsets, and lengths. Why XML and JSON?īefore XML came along, I wrote software to import data stored in unrecorded binary formats. Next, I'll show you two ways to convert XML to JSON using Jackson: the first technique is data binding, and the second is tree traversal. Using SAXON for XSLT/XPath makes it easier to access features like grouping, which I'll demonstrate. First, I'll show you how to override Xalan, a standard XSLT implementation of Java 11 with an XSLT 2.0+ and XPath 2.0+ compatible alternative, SAXON in this case.
