Skip to content

Commit

Permalink
Fix README text
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond McCrae committed Aug 1, 2017
1 parent c2c25e6 commit 342d8e8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
HTML SAX Parser for Swift 3
======
**HTMLSAXParser** is a swift module that wraps the libxml2 HTMLParse for the purposes
of providing a simple lightweight SAX parser for HTML content. SAX parsers provide
an event based parsing process, where a closure you provide will be called with
a series of events as the parser moves through the document.
**HTMLSAXParser** is a swift module that wraps the libxml2 HTMLParser for the purposes
of providing a simple lightweight SAX parser for HTML content. libxml2 is part of the
Mac, iOS and Apple TV SDK, if you are developing for those platforms then you will not
require any additional dependencies. SAX parsers provide an event based parsing process,
where a closure you provide will be called with a series of events as the parser moves
through the document.

**HTMLSAXParser** uses enums with associated types for the parsing events and a
simple of example of usage is: -

```
let parser = HTMLSAXParser()
do {
try parser.parse(string: "<html><body>Some HTML Content</body></html>) { event in
try parser.parse(string: "<html><body>Some HTML Content</body></html>") { event in
switch event {
case let .startElement(name, attributes, location):
print("Found character : \(name)")
Expand Down

0 comments on commit 342d8e8

Please sign in to comment.