{
  "id": "enwiki-001374334137",
  "slug": "simple-api-for-xml",
  "title": "Simple API for XML",
  "qid": "",
  "lead": "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.",
  "body": "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. &#xb6; 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 \"&amp;#xb6; 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 \"&amp;#xb6;\" (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",
  "categories": [
    "22952260",
    "23603337",
    "24043274",
    "26220375",
    "26918715",
    "36237999"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1374334137",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1789116520.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001374334137",
    "type": "webpage",
    "title": "Simple API for XML",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/simple-api-for-xml",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          21
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          21
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001374334137",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1374334137",
    "note": "Immutable snapshot enwiki-001374334137"
  }
}