• Complain

Friesen - Java XML and JSON

Here you can read online Friesen - Java XML and JSON full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Berkeley;CA, year: 2016, publisher: Apress, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Friesen Java XML and JSON
  • Book:
    Java XML and JSON
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2016
  • City:
    Berkeley;CA
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Java XML and JSON: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Java XML and JSON" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Java XML and JSON describes the popular XML and JSON data-interchange languages. You explore each language and learn how to parse/create XML-based documents and parse JSON-based documents via various Java APIs. You also learn how XML and JSON are used in AJAX (and AJAJ), Android, Big Data, and Web Services contexts, all from the Java perspective. What youll learn How to use Java, JSON and XML together to build services, big data How to use XML; parse XML documents with SAX, DOM, StAX; selecting nodes with XPath; and transform XML documents with XSLT What is JSON and how to explore parsing JSON content with Google GSON, Jackson, Quick JSON How to roll your own JSON APIs How to use XML and JSON with Ajax, Android, big data and web services.;Chapter 1: Introducing XML -- Chapter 2: Parsing XML Documents with SAX -- Chapter 3: Parsing and Creating XML Documents with DOM -- Chapter 4: Parsing and Creating XML Documents with StAX -- Chapter 5: Selecting Nodes with XPath -- Chapter 6: Transforming XML Documents with XSLT -- Chapter 7: Introducing JSON -- Chapter 8: Parsing and Creating JSON Objects with mJson -- Chapter 9: Parsing and Creating JSON Objects with Gson -- 10: Extracting JSON Values with JsonPath -- Appendix A: Answers to Exercises.

Friesen: author's other books


Who wrote Java XML and JSON? Find out the surname, the name of the author of the book and a list of all author's works by series.

Java XML and JSON — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Java XML and JSON" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Jeff Friesen 2016
JEFF FRIESEN Java XML and JSON 10.1007/978-1-4842-1916-4_1
1. Introducing XML
Jeff Friesen 1
(1)
Dauphin, Manitoba, Canada
Electronic supplementary material
The online version of this chapter (doi: 10.1007/978-1-4842-1916-4_1 ) contains supplementary material, which is available to authorized users.
Applications commonly use XML documents to store and exchange data. XML defines rules for encoding documents in a format that is both human-readable and machine-readable . This chapter introduces XML, tours the XML language features, and discusses well-formed and valid documents.
What Is XML?
XML (eXtensible Markup Language) is a metalanguage (a language used to describe other languages) for defining vocabularies (custom markup languages), which is the key to XMLs importance and popularity. XML-based vocabularies (such as XHTML) let you describe documents in a meaningful way.
XML vocabulary documents are like HTML (see http://en.wikipedia.org/wiki/HTML ) documents in that they are text-based and consist of markup (encoded descriptions of a documents logical structure) and content (document text not interpreted as markup). Markup is evidenced via tags (angle bracket-delimited syntactic constructs) and each tag has a name. Furthermore, some tags have attributes (name-value pairs) .
Note
XML and HTML are descendants of Standard Generalized Markup Language (SGML) , which is the original metalanguage for creating vocabularies. XML is essentially a restricted form of SGML, while HTML is an application of SGML. The key difference between XML and HTML is that XML invites you to create your own vocabularies with its own tags and rules, whereas HTML gives you a single precreated vocabulary with its own fixed set of tags and rules. XHTML and other XML-based vocabularies are XML applications . XHTML was created to be a cleaner implementation of HTML.
If you havent previously encountered XML, you might be surprised by its simplicity and how closely its vocabularies resemble HTML. You dont need to be a rocket scientist to learn how to create an XML document. To prove this to yourself, check out Listing .
Grilled Cheese Sandwich
bread slice
cheese slice
margarine pat
Place frying pan on element and select medium heat. For each bread slice, smear one pat of margarine on one side of bread slice. Place cheese slice between bread slices with margarine-smeared sides away from the cheese. Place sandwich in frying pan with one margarine-smeared side in contact with pan. Fry for a couple of minutes and flip. Fry other side for a minute and serve.
Listing 1-1.
XML-Based Recipe for a Grilled Cheese Sandwich
Listing presents an XML document that describes a recipe for making a grilled cheese sandwich. This document is reminiscent of an HTML document in that it consists of tags, attributes, and content. However, thats where the similarity ends. Instead of presenting HTML tags such as , , , and

, this informal recipe language presents its own , , and other tags.

Note
Although Listing s and tags might be displayed as a recipe header, spoken aloud, or presented in some other way, depending on the application that parses this document.
Language Features Tour
XML provides several language features for use in defining custom markup languages: XML declaration, elements and attributes, character references and CDATA sections, namespaces, and comments and processing instructions. You will learn about these language features in this section.
XML Declaration
An XML document usually begins with the XML declaration , which is special markup telling an XML parser that the document is XML. The absence of the XML declaration in Listing reveals that this special markup isnt mandatory. When the XML declaration is present, nothing can appear before it.
The XML declaration minimally looks like in which the nonoptional version attribute identifies the version of the XML specification to which the document conforms. The initial version of this specification (1.0) was introduced in 1998 and is widely implemented.
Note
The World Wide Web Consortium (W3C), which maintains XML, released version 1.1 in 2004. This version mainly supports the use of line-ending characters used on EBCDIC platforms (see http://en.wikipedia.org/wiki/EBCDIC ) and the use of scripts and characters that are absent from Unicode 3.2 (see http://en.wikipedia.org/wiki/Unicode ). Unlike XML 1.0, XML 1.1 isnt widely implemented and should be used only by those needing its unique features.
XML supports Unicode, which means that XML documents consist entirely of characters taken from the Unicode character set. The documents characters are encoded into bytes for storage or transmission, and the encoding is specified via the XML declarations optional encoding attribute. One common encoding is UTF-8 (see http://en.wikipedia.org/wiki/UTF-8 ), which is a variable-length encoding of the Unicode character set. UTF-8 is a strict superset of ASCII (see http://en.wikipedia.org/wiki/ASCII ), which means that pure ASCII text files are also UTF-8 documents.
Note
In the absence of the XML declaration or when the XML declarations encoding attribute isnt present, an XML parser typically looks for a special character sequence at the start of a document to determine the documents encoding. This character sequence is known as the byte-order-mark (BOM) and is created by an editor program (such as Microsoft Windows Notepad) when it saves the document according to UTF-8 or some other encoding. For example, the hexadecimal sequence EF BB BF signifies UTF-8 as the encoding. Similarly, FE FF signifies UTF-16 big endian (see https://en.wikipedia.org/wiki/UTF-16 ), FF FE signifies UTF-16 little endian, 00 00 FE FF signifies UTF-32 big endian (see https://en.wikipedia.org/wiki/UTF-32 ), and FF FE 00 00 signifies UTF-32 little endian. UTF-8 is assumed when no BOM is present.
If youll never use characters apart from the ASCII character set, you can probably forget about the encoding attribute. However, when your native language isnt English or when youre called to create XML documents that include non-ASCII characters, you need to properly specify encoding . For example, when your document contains ASCII plus characters from a non-English Western European language (such as , the cedilla used in French, Portuguese, and other languages), you might want to choose ISO-8859-1 as the encoding attributes valuethe document will probably have a smaller size when encoded in this manner than when encoded with UTF-8. Listing shows you the resulting XML declaration.
Le Fabuleux Destin dAmlie Poulain
franais
Listing 1-2.
An Encoded Document Containing Non-ASCII Characters
The final attribute that can appear in the XML declaration is standalone . This optional attribute, which is only relevant with DTDs (discussed later), determines if there are external markup declarations that affect the information passed from an XML processor (a parser) to the application. Its value defaults to no , implying that there are, or may be, such declarations. A yes value indicates that there are no such declarations. For more information, check out The standalone pseudo-attribute is only relevant if a DTD is used article at ( www.xmlplease.com/xml/xmlquotations/standalone ).
Elements and Attributes
Following the XML declaration is a hierarchical (tree) structure of elements, where an element is a portion of the document delimited by a start tag (such as ) and an end tag (such as ), or is an empty-element tag (a standalone tag whose name ends with a forward slash ( / ), such as ). Start tags and end tags surround content and possibly other markup whereas empty-element tags dont surround anything. Figure s XML document tree structure.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Java XML and JSON»

Look at similar books to Java XML and JSON. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Java XML and JSON»

Discussion, reviews of the book Java XML and JSON and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.