The XMLParserFn functor

The XMLParserFn functor generates a parser for the given SML tree representation. The treatment of whitespace and comments when parsing is determined by the Schema substructure of the functor argument.

Synopsis

signature XML_PARSER
functor XMLParserFn (XT : XML_TREE) : XML_PARSER

Functor Argument Interface

XT : XML_TREE

Functor Argument Description

XT : XML_TREE

Defines the tree representation used for the result of the parser, as well as the policy for handling whitespace and comments.

Interface

structure XMLTree : XML_TREE

val parseFile : string -> XMLTree.tree

exception ParseError of string

Interface Description

structure XMLTree : XML_TREE

The argument structure.

val parseFile : string -> XMLTree.tree

parseFile file returns the tree representation of the named text file. The ParseError exception is raised if a syntax error is encountered during parsing.

exception ParseError of string

This exception is raise with a useful error message as its argument when a syntax error is encountered by the parser.