encyclopegia.org

Simple API for XML

SAX (Simple API for XML) is an event-driven online algorithm for lexing and parsing XML documents, with an API developed by the XML-DEV mailing list. SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). Where the DOM operates on the document as a whole—building the full abstract syntax tree of an XML document for convenience of the user—SAX parsers operate on each piece of the XML document sequentially, issuing parsing events while making a single pass through the input stream.

SAX (Simple API for XML) is an event-driven online algorithm for lexing and parsing XML documents, with an API developed by the XML-DEV mailing list. SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). Where the DOM operates on the document as a whole—building the full abstract syntax tree of an XML document for convenience of the user—SAX parsers operate on each piece of the XML document sequentially, issuing parsing events while making a single pass through the input stream. ¶ Some Text Pre-Text Inlined text Post-text. This XML document, when passed through a SAX parser, will generate a sequence of events like the following: XML Element start, named DocumentElement, with an attribute param equal to "value" XML Element start, named FirstElement XML Text node, with data equal to "¶ Some Text" (note: certain white spaces can be changed) XML Element end, named FirstElement Processing Instruction event, with the target some_pi and data some_attr="some_value" (the content after the target is just text; however, it is very common to imitate the syntax of XML attributes, as in this example) XML Element start, named SecondElement, with an attribute param2 equal to "something" XML Text node, with data equal to "Pre-Text" XML Element start, named Inline XML Text node, with data equal to "Inlined text" XML Element end, named Inline XML Text node, with data equal to "Post-text." XML Element end, named SecondElement XML Element end, named DocumentElement Note that the first line of the sample above is the XML Declaration and not a processing instruction; as such it will not be reported as a processing instruction event (although some SAX implementations provide a separate event just for the XML declaration). The result above may vary: the SAX specification deliberately states that a given section of text may be reported as multiple sequential text events. Many parsers, for example, return separate text events for numeric character references. Thus in the example above, a SAX parser may generate a different series of events, part of which might include: XML Element start, named FirstElement XML Text node, with data equal to "¶" (the Unicode character U+00b6) XML Text node, with data equal to " Some Text" XML Element end, named FirstElement ==References== == Further reading== ==External links== SAX home page

References

  1. saxproject.org · retrieved 2026-11-20 · rev 1374334137
    Cite this reference

    MLA "saxproject.org." "saxproject. 2026-11-20. http://www.saxproject.org/. Accessed 24 November 2026.

    Chicago "saxproject.org." "saxproject. 2026-11-20. http://www.saxproject.org/.

    APA "saxproject. (2026). saxproject.org. Retrieved November 24, 2026, from http://www.saxproject.org/

  2. Simple API for XML · retrieved 2011-05-01 · rev 1374334137
    Cite this reference

    MLA "Simple API for XML." 2011-05-01. http://download.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX.html. Accessed 24 November 2026.

    Chicago "Simple API for XML." 2011-05-01. http://download.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX.html.

    APA encyclopegia.org. (2011). Simple API for XML. Retrieved November 24, 2026, from http://download.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX.html

  3. Wu, D.; Chau, K. T.; Wang, J.; Pan, C. (January 2019). A comparative study on performance of XML parser APIs (DOM and SAX) in parsing efficiency . 3rd International Conference on Cryptography, Security and Privacy. Kuala Lumpur, Malaysia: Association for Computing Machinery. pp. 88– 92. doi : 10.1145/3309074.3309124 . Wikipedia revision 1374334137, retrieved 2026-11-21 · retrieved 2026-11-20 · rev 1374334137
    Cite this reference

    MLA "Wu, D.; Chau, K. T.; Wang, J.; Pan, C. (January 2019). A comparative study on performance of XML parser APIs (DOM and SAX) in parsing efficiency . 3rd International Conference on Cryptography, Security and Privacy. Kuala Lumpur, Malaysia: Association for Computing Machinery. pp. 88– 92. doi : 10.1145/3309074.3309124 . Wikipedia revision 1374334137, retrieved 2026-11-21." Wu, D. 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.

    Chicago "Wu, D.; Chau, K. T.; Wang, J.; Pan, C. (January 2019). A comparative study on performance of XML parser APIs (DOM and SAX) in parsing efficiency . 3rd International Conference on Cryptography, Security and Privacy. Kuala Lumpur, Malaysia: Association for Computing Machinery. pp. 88– 92. doi : 10.1145/3309074.3309124 . Wikipedia revision 1374334137, retrieved 2026-11-21." Wu, D. 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier).

    APA Wu, D. (2026). Wu, D.; Chau, K. T.; Wang, J.; Pan, C. (January 2019). A comparative study on performance of XML parser APIs (DOM and SAX) in parsing efficiency . 3rd International Conference on Cryptography, Security and Privacy. Kuala Lumpur, Malaysia: Association for Computing Machinery. pp. 88– 92. doi : 10.1145/3309074.3309124 . Wikipedia revision 1374334137, retrieved 2026-11-21. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)

  4. Wang, Chao (2020). XML Parsing Technique . Innovative Computing: IC 2020. Kuala Lumpur, Malaysia: Springer. pp. 1519– 1526. doi : 10.1007/978-981-15-5959-4_185 . Wikipedia revision 1374334137, retrieved 2026-11-21 · retrieved 2026-11-20 · rev 1374334137
    Cite this reference

    MLA "Wang, Chao (2020). XML Parsing Technique . Innovative Computing: IC 2020. Kuala Lumpur, Malaysia: Springer. pp. 1519– 1526. doi : 10.1007/978-981-15-5959-4_185 . Wikipedia revision 1374334137, retrieved 2026-11-21." Wang, Chao (2020). 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier). Accessed 24 November 2026.

    Chicago "Wang, Chao (2020). XML Parsing Technique . Innovative Computing: IC 2020. Kuala Lumpur, Malaysia: Springer. pp. 1519– 1526. doi : 10.1007/978-981-15-5959-4_185 . Wikipedia revision 1374334137, retrieved 2026-11-21." Wang, Chao (2020). 2026-11-20. https://en.wikipedia.org/wiki/Doi_(identifier).

    APA Wang, Chao (2020). (2026). Wang, Chao (2020). XML Parsing Technique . Innovative Computing: IC 2020. Kuala Lumpur, Malaysia: Springer. pp. 1519– 1526. doi : 10.1007/978-981-15-5959-4_185 . Wikipedia revision 1374334137, retrieved 2026-11-21. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Doi_(identifier)

  5. XML Parsers: DOM and SAX Put to the Test · retrieved 2011-10-19 · rev 1374334137
    Cite this reference

    MLA "XML Parsers: DOM and SAX Put to the Test." Charlie, Frank (February 2001). 2011-10-19. http://www.devx.com/xml/article/16922/1954. Accessed 24 November 2026.

    Chicago "XML Parsers: DOM and SAX Put to the Test." Charlie, Frank (February 2001). 2011-10-19. http://www.devx.com/xml/article/16922/1954.

    APA Charlie, Frank (February 2001). (2011). XML Parsers: DOM and SAX Put to the Test. Retrieved November 24, 2026, from http://www.devx.com/xml/article/16922/1954

  6. SAX · retrieved 2011-05-01 · rev 1374334137
    Cite this reference

    MLA "SAX." a b "SAX". 2011-05-01. http://www.webopedia.com/TERM/S/SAX.html. Accessed 24 November 2026.

    Chicago "SAX." a b "SAX". 2011-05-01. http://www.webopedia.com/TERM/S/SAX.html.

    APA a b "SAX". (2011). SAX. Retrieved November 24, 2026, from http://www.webopedia.com/TERM/S/SAX.html

  7. SAX . webopedia.com . 14 August 2003. retrieved 2011-05-02 · retrieved 2011-05-01 · rev 1374334137
    Cite this reference

    MLA "SAX . webopedia.com . 14 August 2003. retrieved 2011-05-02." SAX. 2011-05-01. https://en.wikipedia.org/w/index.php?oldid=1374334137. Accessed 24 November 2026.

    Chicago "SAX . webopedia.com . 14 August 2003. retrieved 2011-05-02." SAX. 2011-05-01. https://en.wikipedia.org/w/index.php?oldid=1374334137.

    APA SAX. (2011). SAX . webopedia.com . 14 August 2003. retrieved 2011-05-02. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1374334137

  8. saxproject.org . · retrieved 2026-09-10 · rev 1374334137
    Cite this reference

    MLA "saxproject.org ." saxproject. 2026-09-10. https://en.wikipedia.org/w/index.php?oldid=1374334137. Accessed 24 November 2026.

    Chicago "saxproject.org ." saxproject. 2026-09-10. https://en.wikipedia.org/w/index.php?oldid=1374334137.

    APA saxproject. (2026). saxproject.org . Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1374334137

  9. Simple API for XML . oracle.com . retrieved 2011-05-02 · retrieved 2011-05-01 · rev 1374334137
    Cite this reference

    MLA "Simple API for XML . oracle.com . retrieved 2011-05-02." Simple API for XML. 2011-05-01. https://en.wikipedia.org/w/index.php?oldid=1374334137. Accessed 24 November 2026.

    Chicago "Simple API for XML . oracle.com . retrieved 2011-05-02." Simple API for XML. 2011-05-01. https://en.wikipedia.org/w/index.php?oldid=1374334137.

    APA Simple API for XML. (2011). Simple API for XML . oracle.com . retrieved 2011-05-02. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1374334137

  10. Charlie, Frank. XML Parsers: DOM and SAX Put to the Test . devX . Februa. retrieved 2011-10-20 · retrieved 2011-10-19 · rev 1374334137
    Cite this reference

    MLA "Charlie, Frank. XML Parsers: DOM and SAX Put to the Test . devX . Februa. retrieved 2011-10-20." Charlie, Frank. 2011-10-19. https://en.wikipedia.org/w/index.php?oldid=1374334137. Accessed 24 November 2026.

    Chicago "Charlie, Frank. XML Parsers: DOM and SAX Put to the Test . devX . Februa. retrieved 2011-10-20." Charlie, Frank. 2011-10-19. https://en.wikipedia.org/w/index.php?oldid=1374334137.

    APA Charlie, Frank. (2011). Charlie, Frank. XML Parsers: DOM and SAX Put to the Test . devX . Februa. retrieved 2011-10-20. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1374334137

Cite this article

MLA

"Simple API for XML." encyclopegia.org, 2026, https://encyclopegia.org/wiki/simple-api-for-xml. Accessed 24 November 2026.

Chicago

"Simple API for XML." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/simple-api-for-xml.

APA

encyclopegia.org. (2026). Simple API for XML. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/simple-api-for-xml

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

XML Schema

stub · references available

RDF/XML

stub · references available

Lampung Api

stub · references available

Charles the Simple

stub · references available

Simple English Wikipedia

stub · references available

API

stub · references available

The Simple Life of Noah Dearborn

stub · references available

Office Open XML

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1374334137 · 0.5 · snapshot enwiki-001374334137

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.