# Module Xml_lexer

    module Xml_lexer: sig .. end

    type error =

`|` | `EUnterminatedComment`
`|` | `EUnterminatedString`
`|` | `EIdentExpected`
`|` | `ECloseExpected`
`|` | `ENodeExpected`
`|` | `EAttributeNameExpected`
`|` | `EAttributeValueExpected`
`|` | `EUnterminatedEntity`

    type dtd_error =

`|` | `EInvalidDTDDecl`
`|` | `EInvalidDTDTag`
`|` | `EDTDItemExpected`
`|` | `EInvalidDTDElement`
`|` | `EInvalidDTDAttribute`

    exception Error of error

    exception DTDError of dtd_error

    type dtd_decl =

`|` | `DTDFile of `string``
`|` | `DTDData of `Xml_light_types.dtd``

    type token =

`|` | `Tag of `string * (string * string) list * bool``
`|` | `PCData of `string``
`|` | `Endtag of `string``
`|` | `DocType of `(string * dtd_decl)``
`|` | `Eof`

    type pos = int * int * int * int

    val init : Stdlib.Lexing.lexbuf -> unit

    val close : Stdlib.Lexing.lexbuf -> unit

    val token : Stdlib.Lexing.lexbuf -> token

    val dtd : Stdlib.Lexing.lexbuf -> Xml_light_types.dtd

    val pos : Stdlib.Lexing.lexbuf -> pos

    val restore : pos -> unit

    val error_pos_of_pos : pos -> Xml_light_errors.error_pos

    val error_pos : Stdlib.Lexing.lexbuf -> Xml_light_errors.error_pos