A better XML parser through functional programming

Research output: Chapter in Book/Report/Conference proceedingConference contribution

8 Citations (Scopus)

Abstract

This paper demonstrates how a higher-level, declarative view of XML parsing as folding over XML documents has helped to design and implement a better XML parser. By better we mean a full-featured, algorithmically optimal, pure-functional parser, which can act as a stream processor. By better we mean an efficient SAX parser that is easy to use, a parser that does not burden an application with the maintenance of a global state across several callbacks, a parser that eliminates classes of possible application errors. This paper describes such better XML parser, SSAX. We demonstrate that SSAX is a better parser by comparing it with several XML parsers written in various (functional) languages, as well as with the reference XML parser Expat. In the experience of the author the declarative approach has greatly helped in the development of SSAX. We argue that the more expressive, reliable and easier to use application interface is the outcome of implementing the parsing engine as an enhanced tree fold combinator, which fully captures the control pattern of the depthfirst tree traversal.

Original languageEnglish
Title of host publicationPractical Aspects of Declarative Languages - 4th International Symposium, PADL 2002, Proceedings
EditorsShriram Krishnamurthi, C.R. Ramakrishnan
PublisherSpringer Verlag
Pages209-224
Number of pages16
ISBN (Print)354043092X, 9783540430926
DOIs
Publication statusPublished - 2002 Jan 1
Externally publishedYes
Event4th International Symposium on Practical Applications of Declarative Languages, PADL 2002 - Portland, United States
Duration: 2002 Jan 192002 Jan 20

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume2257
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other4th International Symposium on Practical Applications of Declarative Languages, PADL 2002
CountryUnited States
CityPortland
Period02/1/1902/1/20

Keywords

  • Haskell
  • Scheme
  • Traversal
  • Tree fold
  • XML parsing

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint Dive into the research topics of 'A better XML parser through functional programming'. Together they form a unique fingerprint.

  • Cite this

    Kiselyov, O. (2002). A better XML parser through functional programming. In S. Krishnamurthi, & C. R. Ramakrishnan (Eds.), Practical Aspects of Declarative Languages - 4th International Symposium, PADL 2002, Proceedings (pp. 209-224). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 2257). Springer Verlag. https://doi.org/10.1007/3-540-45587-6_14