FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
A tutorial on the universality and expressiveness of fold
Journal of Functional Programming
XML Applications Development in Scheme
Programming and Computing Software
SXSLT: Manipulation Language for XML
PADL '03 Proceedings of the 5th International Symposium on Practical Aspects of Declarative Languages
The Query Language to XML Documents Connected by XLink Links
Programming and Computing Software
Skribe: a functional authoring language
Journal of Functional Programming
Implementing Metcast in Scheme
Higher-Order and Symbolic Computation
Status report: layered streaming XML processing with modules
ML '07 Proceedings of the 2007 workshop on Workshop on ML
Information Systems
A pushdown machine for recursive XML processing
APLAS'06 Proceedings of the 4th Asian conference on Programming Languages and Systems
DEXA'07 Proceedings of the 18th international conference on Database and Expert Systems Applications
Hi-index | 0.00 |
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 depth-first tree traversal.