HaXml-1.25.3: Utilities for manipulating XML documents

Safe Haskell | None
Language | Haskell98

Text.XML.HaXml.Validate

Description

Validate a document against a dtd.

Synopsis

- validate :: DocTypeDecl -> Element i -> [String]
- partialValidate :: DocTypeDecl -> Element i -> [String]

# Documentation

validate :: DocTypeDecl -> Element i -> [String]

`validate` takes a DTD and a tagged element, and returns a list of errors in the document with respect to its DTD.

If you have several documents to validate against a single DTD, then you will gain efficiency by freezing-in the DTD through partial application, e.g. `checkMyDTD = validate myDTD`.

partialValidate :: DocTypeDecl -> Element i -> [String]

`partialValidate` is like validate, except that it does not check that the element type matches that of the DTD's root element.