Expat (software)
{{Short description|Parser library}}
{{Primary sources|date=November 2009}}
{{Infobox software
| name = Expat
| logo =
| screenshot =
| caption =
| author = James Clark
| developer = Clark Cooper, et al.
| released = {{Start date and age|1998}}
| latest release version = {{wikidata|property|preferred|references|edit|P348|P548=Q2804309}}
| latest release date = {{Start date and age|{{wikidata|qualifier|preferred|single|P348|P548=Q2804309|P577}}|df=yes}}
| latest preview version =
| latest preview date =
| programming language = C
| operating system = Portable
| platform =
| license = MIT License{{cite web |title=COPYING |url=https://github.com/libexpat/libexpat/blob/master/expat/COPYING |website=Github |accessdate=16 September 2019}}
| website = {{URL|https://libexpat.github.io}}
}}
Expat is a stream-oriented XML 1.0 parser library, written in C, more precisely C99.{{Cite web |last=Pipping |first=Sebastian |date=2024-02-06 |title=Expat 2.6.0 released, includes security fixes |url=https://www.xml.com/news/2024-02-expat-260/ |access-date=2024-09-04 |website=www.xml.com}} As one of the first available open-source XML parsers, Expat has found a place in many open-source projects. Such projects include the Apache HTTP Server, Mozilla, Perl, Python and PHP. It is also bound in many other languages.
Naming
According to the original creator, the name Expat came from the fact that he was an expat at the time.{{citation needed|date=September 2024}} The "ex" and the "pa" are for XML and parsing.
Timeline
Software developer James Clark released version 1.0 in 1998 while serving as technical lead on the XML Working Group at the World Wide Web Consortium.{{citation needed|date=November 2016}} Clark released two more versions, 1.1 and 1.2, before turning the project over to a group led by Clark Cooper and Fred Drake in 2000. The new group released version 1.95.0 in September 2000 and continues to release new versions to incorporate bug fixes and enhancements.
Versions up to 2.5.0 have a Score 7.5 (High) DoS vulnerability CVE-2023-52425.{{Cite web |title=NVD - cve-2023-52425 |url=https://nvd.nist.gov/vuln/detail/cve-2023-52425 |access-date=2025-04-22 |website=nvd.nist.gov}}{{Cite web |title=CVE-2023-52425 |url=https://security-tracker.debian.org/tracker/CVE-2023-52425 |access-date=2025-04-22 |website=security-tracker.debian.org}}
Availability
GitHub hosts the Expat project. Versions exist for most{{Quantify|date=June 2011}} major{{Citation needed|date=June 2011}} operating-systems.
Deployment
To use the Expat library, programs first register handler functions with Expat. When Expat parses an XML document, it calls the registered handlers as it finds relevant tokens in the input stream. These tokens and their associated handler calls are called events. Typically, programs register handler functions for XML element start or stop events and character events. Expat provides facilities for more sophisticated event handling such as XML Namespace declarations, processing instructions and DTD events.
Expat's parsing events resemble the events defined in the Simple API for XML (SAX), but Expat is not a SAX-compliant parser. Projects incorporating the Expat library often build SAX and possibly DOM parsers on top of Expat. While Expat is mainly a stream-based (push) parser, it supports stopping and restarting parsing at arbitrary times, thus making the implementation of a pull parser relatively easy as well.
References
{{Reflist}}
External links
- [http://www.libexpat.org Expat Project Home Page]
- [http://www.xml.com/pub/a/1999/09/expat/index.html Using Expat, Clark Cooper, 1999]