© Jeff Friesen 2016

JEFF FRIESEN, Java XML and JSON, 10.1007/978-1-4842-1916-4_4

4. Parsing and Creating XML Documents with StAX

Jeff Friesen

(1)Dauphin, Manitoba, Canada

Java also includes the StAX API for parsing and creating XML documents. This chapter introduces you to StAX.

What Is StAX ?

Streaming API for XML (StAX) is a Java API for parsing an XML document sequentially from start to finish, and also for creating XML documents. StAX was introduced by Java 6 as an alternative to SAX and DOM, and is located midway between these “polar opposites.”

Get Java XML and JSON now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.