HTML Parser 0.2.8
Because only Chuck Norris can parse HTML with regular expressions (Internal)

HTML Parser is a support library that aids Fantom-Factory Ltd in the development of other libraries, frameworks and applications. Though you are welcome to use it, you may find features are missing and the documentation incomplete.

A valiant effort to parse valid HTML5 documents into XML as defined by W3C HTML Syntax.

Html Parser currently recognises and supports:

Elements:

  • Normal elements: <div></div>
  • Void elements: <br>
  • Self closing elements: <foreignElement />
  • Raw text elements: <script> ... </script>
  • Escapable raw text elements: <textarea> ... </textarea>

Attributes:

  • Empty attributes: <input disabled>
  • Unquoted attributes: <input type=submit>
  • Single quoted attributes: <input type='submit'>
  • Double quoted attributes: <input type="submit">

Other:

  • XML declarations: <?xml version="1.0" ?>
  • DocTypes: <!DOCTYPE html >
  • Comments: <!-- comment -->
  • CData Sections: <![CDATA[ cdata ]]>
  • Numerical character references: &#160; and &#xA0;

    Html Parser because only Chuck Norris can parse HTML with regular expressions.

Read more...

Install

To install HTML Parser with Fantom Pod Manager, cut'n'paste the following into a cmd prompt, terminal or shell:

Or to install HTML Parser with the Fantom Repository Manager (fanr), cut'n'paste the following into a cmd prompt, terminal or shell:

Or to install manually, download the pod file and copy it to the %FAN_HOME%/lib/fan/ directory.

afHtmlParser.pod (45.88 kB)

Use

To use HTML Parser in a Fantom project, add a dependency to the project's build.fan:

depends = ["sys 1.0", ..., "afHtmlParser 0.2.8 - 0.2"]

Documentation

Information

Meta information on the HTML Parser pod:

Published by
Steve Eynon
Organisation
Fantom-Factory Ltd
Pod file size
45.88 kB
Licence
ISC
Built on
8th Jul 2020
Source code
via Git at https://github.com/Fantom-Factory/afHtmlParser
Depends on
afPegger, sys, xml
Referenced by
afBounce
Javascript Compatible

Dependency Graph

  Use mouse to re-position pods

Release History

There have been 9 releases of HTML Parser: