Design and Implementation of a validating XML parser in Haskell: Master's thesis; University of Applied Sciences Wedel | ||
---|---|---|
Prev | Next |
The following chapter describes the package hparser. It contains all modules for parsing XML files and checking the well-formedness constraints of XML. Validation, normalizing attribute values and adding default values is done by the separate package hvalidator.
The parser works internally with filters for reading XML data and processing the constructed XmlTree. The whole parser works with filters of type XmlStateFilter from the module XmlState so that trace-output of the computations can be generated, errors can be reported and some state information can be saved where it is necessary.
The package hparser provides five public modules for implementing an XML parser, which builds the generic tree data structure XmlTree from XML documents.
Modules
Basic parser for building the generic tree data structure XmlTree. Bases on XmlParser, XmlInput and DTDProcessing.
Parses XML files. Bases on the free monadic parser combinator library Parsec [WWW29].
Reads XML files, handles different character encodings.
Processes the DTD. Substitution of general and parameter entities, merging of the internal and external DTD subset.
Prints the parsed data by using the XmlStateFilter defined in module XmlState.