The XMLParserFn functor
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
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.

## See Also

`XML_SCHEMA`, `XML_TREE`, The XML Library

SML/NJ Version 110.99.9 (November 4, 2025)
Last updated 2025-11-04 15:48:25 UTC