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

HTML Parser is a support library that aids Alien-Factory 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 (63.37 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.1.2 - 0.1"]

Documentation

Information

Meta information on the HTML Parser pod:

Published by
Steve Eynon
Organisation
Alien-Factory
Pod file size
63.37 kB
Licence
ISC Licence (ISC)
Built on
17th Nov 2016
Source code
via Mercurial at https://bitbucket.org/AlienFactory/afhtmlparser
Depends on
afPegger, sys, xml
Referenced by
afBounce
Javascript Compatible

Dependency Graph

  Use mouse to re-position pods

Release History

There have been 4 releases of HTML Parser: