3.6 Parsing Primitives
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SGML/XML parser
        • Predicate Reference
          • Parsing Primitives
            • new_sgml_parser/2
            • free_sgml_parser/1
            • set_sgml_parser/2
            • get_sgml_parser/2
            • sgml_parse/2
            • Partial Parsing
Availability::- use_module(library(sgml)).(can be autoloaded)
new_sgml_parser(-Parser, +Options)
Creates a new parser. A parser can be used one or multiple times for parsing documents or parts thereof. It may be bound to a DTD or the DTD may be left implicit, in which case it is created from the document prologue or parsing is performed without a DTD. Options:
dtd(?DTD)
If specified with an initialised DTD, this DTD is used for parsing the document, regardless of the document prologue. If specified using as a variable, a reference to the created DTD is returned. This DTD may be created from the document prologue or build implicitely from the document's content.