The streaming API for XML (StAX) classes The streaming API for XML (StAX) classes use streaming while managing XML documents. The StaxWriter class The xml.StaxWriter class provides methods compatible with Streaming API for XML(StAX) for writing XML documents. The StaxReader class The StaxReader class provides methods compatible with Streaming API for XML(StAX) for reading XML documents.