193fb6ee3Sopenharmony_ci<!DOCTYPE html> 293fb6ee3Sopenharmony_ci<html><head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"> 393fb6ee3Sopenharmony_ci<meta charset="utf-8"> 493fb6ee3Sopenharmony_ci<meta http-equiv="X-UA-Compatible" content="IE=edge"> 593fb6ee3Sopenharmony_ci<title>inikulin/parse5</title> 693fb6ee3Sopenharmony_ci<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> 793fb6ee3Sopenharmony_ci<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> 893fb6ee3Sopenharmony_ci<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png"> 993fb6ee3Sopenharmony_ci<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png"> 1093fb6ee3Sopenharmony_ci<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png"> 1193fb6ee3Sopenharmony_ci<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png"> 1293fb6ee3Sopenharmony_ci<meta property="fb:app_id" content="1401488693436528"> 1393fb6ee3Sopenharmony_ci<meta content="@github" name="twitter:site"><meta content="summary" name="twitter:card"><meta content="inikulin/parse5" name="twitter:title"><meta content="parse5 - Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification." name="twitter:description"><meta content="https://0.gravatar.com/avatar/64ee497c4a533144a9bf9ce2a6c010c5?d=https%3A%2F%2Fidenticons.github.com%2F9dd4dc5634e3d3d97c7d5a34ba28b850.png&r=x&s=400" name="twitter:image:src"> 1493fb6ee3Sopenharmony_ci<meta content="GitHub" property="og:site_name"><meta content="object" property="og:type"><meta content="https://0.gravatar.com/avatar/64ee497c4a533144a9bf9ce2a6c010c5?d=https%3A%2F%2Fidenticons.github.com%2F9dd4dc5634e3d3d97c7d5a34ba28b850.png&r=x&s=400" property="og:image"><meta content="inikulin/parse5" property="og:title"><meta content="https://github.com/inikulin/parse5" property="og:url"><meta content="parse5 - Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification." property="og:description"> 1593fb6ee3Sopenharmony_ci 1693fb6ee3Sopenharmony_ci<meta name="hostname" content="github-fe139-cp1-prd.iad.github.net"> 1793fb6ee3Sopenharmony_ci<meta name="ruby" content="ruby 2.1.0p0-github-tcmalloc (60139581e1) [x86_64-linux]"> 1893fb6ee3Sopenharmony_ci<link rel="assets" href="https://github.global.ssl.fastly.net/"> 1993fb6ee3Sopenharmony_ci<link rel="conduit-xhr" href="https://ghconduit.com:25035/"> 2093fb6ee3Sopenharmony_ci<link rel="xhr-socket" href="/_sockets"> 2193fb6ee3Sopenharmony_ci 2293fb6ee3Sopenharmony_ci 2393fb6ee3Sopenharmony_ci 2493fb6ee3Sopenharmony_ci<meta name="msapplication-TileImage" content="/windows-tile.png"> 2593fb6ee3Sopenharmony_ci<meta name="msapplication-TileColor" content="#ffffff"> 2693fb6ee3Sopenharmony_ci<meta name="selected-link" value="repo_source" data-pjax-transient=""> 2793fb6ee3Sopenharmony_ci<meta content="collector.githubapp.com" name="octolytics-host"><meta content="collector-cdn.github.com" name="octolytics-script-host"><meta content="github" name="octolytics-app-id"><meta content="BC802450:77B8:1BEFBBB:52E7B0AD" name="octolytics-dimension-request_id"><meta content="453071" name="octolytics-actor-id"><meta content="inikulin" name="octolytics-actor-login"><meta content="dcd292e4f5a14fcca9047ec5928186bef2925b78f574ae89c6be99c099695093" name="octolytics-actor-hash"> 2893fb6ee3Sopenharmony_ci 2993fb6ee3Sopenharmony_ci 3093fb6ee3Sopenharmony_ci 3193fb6ee3Sopenharmony_ci 3293fb6ee3Sopenharmony_ci<link rel="icon" type="image/x-icon" href="/favicon.ico"> 3393fb6ee3Sopenharmony_ci 3493fb6ee3Sopenharmony_ci<meta content="authenticity_token" name="csrf-param"> 3593fb6ee3Sopenharmony_ci<meta content="QCjdZSQ/aWGKiOknksU3UAanpjr415E/Uf5HPq07DzE=" name="csrf-token"> 3693fb6ee3Sopenharmony_ci 3793fb6ee3Sopenharmony_ci<link href="https://github.global.ssl.fastly.net/assets/github-894b05c38c2dcc924115c5a685b514f0ed11ecbe.css" media="all" rel="stylesheet" type="text/css"> 3893fb6ee3Sopenharmony_ci<link href="https://github.global.ssl.fastly.net/assets/github2-10f7b6999ba0543eaa86b9fe582445f0ee747741.css" media="all" rel="stylesheet" type="text/css"> 3993fb6ee3Sopenharmony_ci 4093fb6ee3Sopenharmony_ci 4193fb6ee3Sopenharmony_ci 4293fb6ee3Sopenharmony_ci<script src="https://github.global.ssl.fastly.net/assets/frameworks-2086b76396d7018acf390457357b14121f3e16f3.js" type="text/javascript"></script> 4393fb6ee3Sopenharmony_ci<script async="async" defer="defer" src="https://github.global.ssl.fastly.net/assets/github-4f3fea02ac13c7f75f0e8530e0996e90c6e78194.js" type="text/javascript"></script> 4493fb6ee3Sopenharmony_ci 4593fb6ee3Sopenharmony_ci<meta http-equiv="x-pjax-version" content="c360d73a08ef99ad12374a4c17689461"> 4693fb6ee3Sopenharmony_ci 4793fb6ee3Sopenharmony_ci 4893fb6ee3Sopenharmony_ci<meta name="description" content="parse5 - Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification."> 4993fb6ee3Sopenharmony_ci 5093fb6ee3Sopenharmony_ci<meta content="453071" name="octolytics-dimension-user_id"><meta content="inikulin" name="octolytics-dimension-user_login"><meta content="8862593" name="octolytics-dimension-repository_id"><meta content="inikulin/parse5" name="octolytics-dimension-repository_nwo"><meta content="true" name="octolytics-dimension-repository_public"><meta content="false" name="octolytics-dimension-repository_is_fork"><meta content="8862593" name="octolytics-dimension-repository_network_root_id"><meta content="inikulin/parse5" name="octolytics-dimension-repository_network_root_nwo"> 5193fb6ee3Sopenharmony_ci<link href="https://github.com/inikulin/parse5/commits/master.atom" rel="alternate" title="Recent Commits to parse5:master" type="application/atom+xml"> 5293fb6ee3Sopenharmony_ci 5393fb6ee3Sopenharmony_ci</head> 5493fb6ee3Sopenharmony_ci 5593fb6ee3Sopenharmony_ci 5693fb6ee3Sopenharmony_ci<body class="logged_in env-production windows vis-public"> 5793fb6ee3Sopenharmony_ci<div class="wrapper"> 5893fb6ee3Sopenharmony_ci 5993fb6ee3Sopenharmony_ci 6093fb6ee3Sopenharmony_ci 6193fb6ee3Sopenharmony_ci 6293fb6ee3Sopenharmony_ci 6393fb6ee3Sopenharmony_ci 6493fb6ee3Sopenharmony_ci<div class="header header-logged-in true"> 6593fb6ee3Sopenharmony_ci<div class="container clearfix"> 6693fb6ee3Sopenharmony_ci 6793fb6ee3Sopenharmony_ci<a class="header-logo-invertocat" href="https://github.com/"> 6893fb6ee3Sopenharmony_ci<span class="mega-octicon octicon-mark-github"></span> 6993fb6ee3Sopenharmony_ci</a> 7093fb6ee3Sopenharmony_ci 7193fb6ee3Sopenharmony_ci 7293fb6ee3Sopenharmony_ci<a href="/notifications" class="notification-indicator tooltipped downwards" data-gotokey="n" title="You have no unread notifications"> 7393fb6ee3Sopenharmony_ci<span class="mail-status all-read"></span> 7493fb6ee3Sopenharmony_ci</a> 7593fb6ee3Sopenharmony_ci 7693fb6ee3Sopenharmony_ci<div class="command-bar js-command-bar in-repository"> 7793fb6ee3Sopenharmony_ci<form accept-charset="UTF-8" action="/search" class="command-bar-form" id="top_search_form" method="get"> 7893fb6ee3Sopenharmony_ci 7993fb6ee3Sopenharmony_ci<input type="text" data-hotkey="/ s" name="q" id="js-command-bar-field" placeholder="Search or type a command" tabindex="1" autocapitalize="off" data-username="inikulin" data-repo="inikulin/parse5" data-branch="master" data-sha="805df99e28e1373996c56faa90a96fa366e1fc12"> 8093fb6ee3Sopenharmony_ci 8193fb6ee3Sopenharmony_ci<input type="hidden" name="nwo" value="inikulin/parse5"> 8293fb6ee3Sopenharmony_ci 8393fb6ee3Sopenharmony_ci<div class="select-menu js-menu-container js-select-menu search-context-select-menu"> 8493fb6ee3Sopenharmony_ci<span class="minibutton select-menu-button js-menu-target"> 8593fb6ee3Sopenharmony_ci<span class="js-select-button">This repository</span> 8693fb6ee3Sopenharmony_ci</span> 8793fb6ee3Sopenharmony_ci 8893fb6ee3Sopenharmony_ci<div class="select-menu-modal-holder js-menu-content js-navigation-container"> 8993fb6ee3Sopenharmony_ci<div class="select-menu-modal"> 9093fb6ee3Sopenharmony_ci 9193fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item js-this-repository-navigation-item selected"> 9293fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 9393fb6ee3Sopenharmony_ci<input type="radio" class="js-search-this-repository" name="search_target" value="repository" checked="checked"> 9493fb6ee3Sopenharmony_ci<div class="select-menu-item-text js-select-button-text">This repository</div> 9593fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 9693fb6ee3Sopenharmony_ci 9793fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item js-all-repositories-navigation-item"> 9893fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 9993fb6ee3Sopenharmony_ci<input type="radio" name="search_target" value="global"> 10093fb6ee3Sopenharmony_ci<div class="select-menu-item-text js-select-button-text">All repositories</div> 10193fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 10293fb6ee3Sopenharmony_ci 10393fb6ee3Sopenharmony_ci</div> 10493fb6ee3Sopenharmony_ci</div> 10593fb6ee3Sopenharmony_ci</div> 10693fb6ee3Sopenharmony_ci 10793fb6ee3Sopenharmony_ci<span class="octicon help tooltipped downwards" title="Show command bar help"> 10893fb6ee3Sopenharmony_ci<span class="octicon octicon-question"></span> 10993fb6ee3Sopenharmony_ci</span> 11093fb6ee3Sopenharmony_ci 11193fb6ee3Sopenharmony_ci 11293fb6ee3Sopenharmony_ci<input type="hidden" name="ref" value="cmdform"> 11393fb6ee3Sopenharmony_ci 11493fb6ee3Sopenharmony_ci</form> 11593fb6ee3Sopenharmony_ci<ul class="top-nav"> 11693fb6ee3Sopenharmony_ci<li class="explore"><a href="/explore">Explore</a></li> 11793fb6ee3Sopenharmony_ci<li><a href="https://gist.github.com">Gist</a></li> 11893fb6ee3Sopenharmony_ci<li><a href="/blog">Blog</a></li> 11993fb6ee3Sopenharmony_ci<li><a href="https://help.github.com">Help</a></li> 12093fb6ee3Sopenharmony_ci</ul> 12193fb6ee3Sopenharmony_ci</div> 12293fb6ee3Sopenharmony_ci 12393fb6ee3Sopenharmony_ci 12493fb6ee3Sopenharmony_ci 12593fb6ee3Sopenharmony_ci 12693fb6ee3Sopenharmony_ci<ul id="user-links"> 12793fb6ee3Sopenharmony_ci<li> 12893fb6ee3Sopenharmony_ci<a href="/inikulin" class="name"> 12993fb6ee3Sopenharmony_ci<img alt="Ivan Nikulin" height="20" src="https://2.gravatar.com/avatar/64ee497c4a533144a9bf9ce2a6c010c5?d=https%3A%2F%2Fidenticons.github.com%2F9dd4dc5634e3d3d97c7d5a34ba28b850.png&r=x&s=140" width="20"> inikulin 13093fb6ee3Sopenharmony_ci</a> 13193fb6ee3Sopenharmony_ci</li> 13293fb6ee3Sopenharmony_ci 13393fb6ee3Sopenharmony_ci<li class="new-menu dropdown-toggle js-menu-container"> 13493fb6ee3Sopenharmony_ci<a href="#" class="js-menu-target tooltipped downwards" title="Create new..." aria-label="Create new..."> 13593fb6ee3Sopenharmony_ci<span class="octicon octicon-plus"></span> 13693fb6ee3Sopenharmony_ci<span class="dropdown-arrow"></span> 13793fb6ee3Sopenharmony_ci</a> 13893fb6ee3Sopenharmony_ci 13993fb6ee3Sopenharmony_ci<div class="js-menu-content"> 14093fb6ee3Sopenharmony_ci</div> 14193fb6ee3Sopenharmony_ci</li> 14293fb6ee3Sopenharmony_ci 14393fb6ee3Sopenharmony_ci<li> 14493fb6ee3Sopenharmony_ci<a href="/settings/profile" id="account_settings" class="tooltipped downwards" aria-label="Account settings " title="Account settings "> 14593fb6ee3Sopenharmony_ci<span class="octicon octicon-tools"></span> 14693fb6ee3Sopenharmony_ci</a> 14793fb6ee3Sopenharmony_ci</li> 14893fb6ee3Sopenharmony_ci<li> 14993fb6ee3Sopenharmony_ci<a class="tooltipped downwards" href="/logout" data-method="post" id="logout" title="Sign out" aria-label="Sign out"> 15093fb6ee3Sopenharmony_ci<span class="octicon octicon-log-out"></span> 15193fb6ee3Sopenharmony_ci</a> 15293fb6ee3Sopenharmony_ci</li> 15393fb6ee3Sopenharmony_ci 15493fb6ee3Sopenharmony_ci</ul> 15593fb6ee3Sopenharmony_ci 15693fb6ee3Sopenharmony_ci<div class="js-new-dropdown-contents hidden"> 15793fb6ee3Sopenharmony_ci 15893fb6ee3Sopenharmony_ci 15993fb6ee3Sopenharmony_ci<ul class="dropdown-menu"> 16093fb6ee3Sopenharmony_ci<li> 16193fb6ee3Sopenharmony_ci<a href="/new"><span class="octicon octicon-repo-create"></span> New repository</a> 16293fb6ee3Sopenharmony_ci</li> 16393fb6ee3Sopenharmony_ci<li> 16493fb6ee3Sopenharmony_ci<a href="/organizations/new"><span class="octicon octicon-organization"></span> New organization</a> 16593fb6ee3Sopenharmony_ci</li> 16693fb6ee3Sopenharmony_ci 16793fb6ee3Sopenharmony_ci 16893fb6ee3Sopenharmony_ci 16993fb6ee3Sopenharmony_ci<li class="section-title"> 17093fb6ee3Sopenharmony_ci<span title="inikulin/parse5">This repository</span> 17193fb6ee3Sopenharmony_ci</li> 17293fb6ee3Sopenharmony_ci<li> 17393fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/issues/new"><span class="octicon octicon-issue-opened"></span> New issue</a> 17493fb6ee3Sopenharmony_ci</li> 17593fb6ee3Sopenharmony_ci<li> 17693fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/settings/collaboration"><span class="octicon octicon-person-add"></span> New collaborator</a> 17793fb6ee3Sopenharmony_ci</li> 17893fb6ee3Sopenharmony_ci</ul> 17993fb6ee3Sopenharmony_ci 18093fb6ee3Sopenharmony_ci</div> 18193fb6ee3Sopenharmony_ci 18293fb6ee3Sopenharmony_ci 18393fb6ee3Sopenharmony_ci 18493fb6ee3Sopenharmony_ci</div> 18593fb6ee3Sopenharmony_ci</div> 18693fb6ee3Sopenharmony_ci 18793fb6ee3Sopenharmony_ci 18893fb6ee3Sopenharmony_ci 18993fb6ee3Sopenharmony_ci 19093fb6ee3Sopenharmony_ci 19193fb6ee3Sopenharmony_ci 19293fb6ee3Sopenharmony_ci 19393fb6ee3Sopenharmony_ci 19493fb6ee3Sopenharmony_ci<div class="site" itemscope="" itemtype="http://schema.org/WebPage"> 19593fb6ee3Sopenharmony_ci 19693fb6ee3Sopenharmony_ci<div class="pagehead repohead instapaper_ignore readability-menu"> 19793fb6ee3Sopenharmony_ci<div class="container"> 19893fb6ee3Sopenharmony_ci 19993fb6ee3Sopenharmony_ci 20093fb6ee3Sopenharmony_ci<ul class="pagehead-actions"> 20193fb6ee3Sopenharmony_ci 20293fb6ee3Sopenharmony_ci<li class="subscription"> 20393fb6ee3Sopenharmony_ci<form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="QCjdZSQ/aWGKiOknksU3UAanpjr415E/Uf5HPq07DzE="></div> <input id="repository_id" name="repository_id" type="hidden" value="8862593"> 20493fb6ee3Sopenharmony_ci 20593fb6ee3Sopenharmony_ci<div class="select-menu js-menu-container js-select-menu"> 20693fb6ee3Sopenharmony_ci<a class="social-count js-social-count" href="/inikulin/parse5/watchers"> 20793fb6ee3Sopenharmony_ci22 20893fb6ee3Sopenharmony_ci</a> 20993fb6ee3Sopenharmony_ci<span class="minibutton select-menu-button with-count js-menu-target" role="button" tabindex="0"> 21093fb6ee3Sopenharmony_ci<span class="js-select-button"> 21193fb6ee3Sopenharmony_ci<span class="octicon octicon-eye-unwatch"></span> 21293fb6ee3Sopenharmony_ciUnwatch 21393fb6ee3Sopenharmony_ci</span> 21493fb6ee3Sopenharmony_ci</span> 21593fb6ee3Sopenharmony_ci 21693fb6ee3Sopenharmony_ci<div class="select-menu-modal-holder"> 21793fb6ee3Sopenharmony_ci<div class="select-menu-modal subscription-menu-modal js-menu-content"> 21893fb6ee3Sopenharmony_ci<div class="select-menu-header"> 21993fb6ee3Sopenharmony_ci<span class="select-menu-title">Notification status</span> 22093fb6ee3Sopenharmony_ci<span class="octicon octicon-remove-close js-menu-close"></span> 22193fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-header --> 22293fb6ee3Sopenharmony_ci 22393fb6ee3Sopenharmony_ci<div class="select-menu-list js-navigation-container" role="menu"> 22493fb6ee3Sopenharmony_ci 22593fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0"> 22693fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 22793fb6ee3Sopenharmony_ci<div class="select-menu-item-text"> 22893fb6ee3Sopenharmony_ci<input id="do_included" name="do" type="radio" value="included"> 22993fb6ee3Sopenharmony_ci<h4>Not watching</h4> 23093fb6ee3Sopenharmony_ci<span class="description">You only receive notifications for conversations in which you participate or are @mentioned.</span> 23193fb6ee3Sopenharmony_ci<span class="js-select-button-text hidden-select-button-text"> 23293fb6ee3Sopenharmony_ci<span class="octicon octicon-eye-watch"></span> 23393fb6ee3Sopenharmony_ciWatch 23493fb6ee3Sopenharmony_ci</span> 23593fb6ee3Sopenharmony_ci</div> 23693fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 23793fb6ee3Sopenharmony_ci 23893fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0"> 23993fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon octicon-check"></span> 24093fb6ee3Sopenharmony_ci<div class="select-menu-item-text"> 24193fb6ee3Sopenharmony_ci<input checked="checked" id="do_subscribed" name="do" type="radio" value="subscribed"> 24293fb6ee3Sopenharmony_ci<h4>Watching</h4> 24393fb6ee3Sopenharmony_ci<span class="description">You receive notifications for all conversations in this repository.</span> 24493fb6ee3Sopenharmony_ci<span class="js-select-button-text hidden-select-button-text"> 24593fb6ee3Sopenharmony_ci<span class="octicon octicon-eye-unwatch"></span> 24693fb6ee3Sopenharmony_ciUnwatch 24793fb6ee3Sopenharmony_ci</span> 24893fb6ee3Sopenharmony_ci</div> 24993fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 25093fb6ee3Sopenharmony_ci 25193fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0"> 25293fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 25393fb6ee3Sopenharmony_ci<div class="select-menu-item-text"> 25493fb6ee3Sopenharmony_ci<input id="do_ignore" name="do" type="radio" value="ignore"> 25593fb6ee3Sopenharmony_ci<h4>Ignoring</h4> 25693fb6ee3Sopenharmony_ci<span class="description">You do not receive any notifications for conversations in this repository.</span> 25793fb6ee3Sopenharmony_ci<span class="js-select-button-text hidden-select-button-text"> 25893fb6ee3Sopenharmony_ci<span class="octicon octicon-mute"></span> 25993fb6ee3Sopenharmony_ciStop ignoring 26093fb6ee3Sopenharmony_ci</span> 26193fb6ee3Sopenharmony_ci</div> 26293fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 26393fb6ee3Sopenharmony_ci 26493fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-list --> 26593fb6ee3Sopenharmony_ci 26693fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-modal --> 26793fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-modal-holder --> 26893fb6ee3Sopenharmony_ci</div> <!-- /.select-menu --> 26993fb6ee3Sopenharmony_ci 27093fb6ee3Sopenharmony_ci</form> 27193fb6ee3Sopenharmony_ci</li> 27293fb6ee3Sopenharmony_ci 27393fb6ee3Sopenharmony_ci<li> 27493fb6ee3Sopenharmony_ci 27593fb6ee3Sopenharmony_ci 27693fb6ee3Sopenharmony_ci<div class="js-toggler-container js-social-container starring-container on"> 27793fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/unstar" class="minibutton with-count js-toggler-target star-button starred upwards" title="Unstar this repository" data-remote="true" data-method="post" rel="nofollow"> 27893fb6ee3Sopenharmony_ci<span class="octicon octicon-star-delete"></span><span class="text">Unstar</span> 27993fb6ee3Sopenharmony_ci</a> 28093fb6ee3Sopenharmony_ci 28193fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/star" class="minibutton with-count js-toggler-target star-button unstarred upwards" title="Star this repository" data-remote="true" data-method="post" rel="nofollow"> 28293fb6ee3Sopenharmony_ci<span class="octicon octicon-star"></span><span class="text">Star</span> 28393fb6ee3Sopenharmony_ci</a> 28493fb6ee3Sopenharmony_ci 28593fb6ee3Sopenharmony_ci<a class="social-count js-social-count" href="/inikulin/parse5/stargazers"> 28693fb6ee3Sopenharmony_ci406 28793fb6ee3Sopenharmony_ci</a> 28893fb6ee3Sopenharmony_ci</div> 28993fb6ee3Sopenharmony_ci 29093fb6ee3Sopenharmony_ci</li> 29193fb6ee3Sopenharmony_ci 29293fb6ee3Sopenharmony_ci 29393fb6ee3Sopenharmony_ci<li> 29493fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/fork" class="minibutton with-count js-toggler-target fork-button lighter upwards" title="Fork this repo" rel="facebox nofollow"> 29593fb6ee3Sopenharmony_ci<span class="octicon octicon-git-branch-create"></span><span class="text">Fork</span> 29693fb6ee3Sopenharmony_ci</a> 29793fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/network" class="social-count">14</a> 29893fb6ee3Sopenharmony_ci</li> 29993fb6ee3Sopenharmony_ci 30093fb6ee3Sopenharmony_ci 30193fb6ee3Sopenharmony_ci</ul> 30293fb6ee3Sopenharmony_ci 30393fb6ee3Sopenharmony_ci<h1 itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public"> 30493fb6ee3Sopenharmony_ci<span class="repo-label"><span>public</span></span> 30593fb6ee3Sopenharmony_ci<span class="mega-octicon octicon-repo"></span> 30693fb6ee3Sopenharmony_ci<span class="author"> 30793fb6ee3Sopenharmony_ci<a href="/inikulin" class="url fn" itemprop="url" rel="author"><span itemprop="title">inikulin</span></a> 30893fb6ee3Sopenharmony_ci</span> 30993fb6ee3Sopenharmony_ci<span class="repohead-name-divider">/</span> 31093fb6ee3Sopenharmony_ci<strong><a href="/inikulin/parse5" class="js-current-repository js-repo-home-link">parse5</a></strong> 31193fb6ee3Sopenharmony_ci 31293fb6ee3Sopenharmony_ci<span class="page-context-loader"> 31393fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 31493fb6ee3Sopenharmony_ci</span> 31593fb6ee3Sopenharmony_ci 31693fb6ee3Sopenharmony_ci</h1> 31793fb6ee3Sopenharmony_ci</div><!-- /.container --> 31893fb6ee3Sopenharmony_ci</div><!-- /.repohead --> 31993fb6ee3Sopenharmony_ci 32093fb6ee3Sopenharmony_ci<div class="container"> 32193fb6ee3Sopenharmony_ci 32293fb6ee3Sopenharmony_ci 32393fb6ee3Sopenharmony_ci<div class="repository-with-sidebar repo-container with-full-navigation "> 32493fb6ee3Sopenharmony_ci 32593fb6ee3Sopenharmony_ci<div class="repository-sidebar"> 32693fb6ee3Sopenharmony_ci 32793fb6ee3Sopenharmony_ci 32893fb6ee3Sopenharmony_ci<div class="sunken-menu vertical-right repo-nav js-repo-nav js-repository-container-pjax js-octicon-loaders"> 32993fb6ee3Sopenharmony_ci<div class="sunken-menu-contents"> 33093fb6ee3Sopenharmony_ci<ul class="sunken-menu-group"> 33193fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Code"> 33293fb6ee3Sopenharmony_ci<a href="/inikulin/parse5" aria-label="Code" class="selected js-selected-navigation-item sunken-menu-item" data-gotokey="c" data-pjax="true" data-selected-links="repo_source repo_downloads repo_commits repo_tags repo_branches /inikulin/parse5"> 33393fb6ee3Sopenharmony_ci<span class="octicon octicon-code"></span> <span class="full-word">Code</span> 33493fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 33593fb6ee3Sopenharmony_ci</a> </li> 33693fb6ee3Sopenharmony_ci 33793fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Issues"> 33893fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/issues" aria-label="Issues" class="js-selected-navigation-item sunken-menu-item js-disable-pjax" data-gotokey="i" data-selected-links="repo_issues /inikulin/parse5/issues"> 33993fb6ee3Sopenharmony_ci<span class="octicon octicon-issue-opened"></span> <span class="full-word">Issues</span> 34093fb6ee3Sopenharmony_ci<span class="counter">0</span> 34193fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 34293fb6ee3Sopenharmony_ci</a> </li> 34393fb6ee3Sopenharmony_ci 34493fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Pull Requests"> 34593fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/pulls" aria-label="Pull Requests" class="js-selected-navigation-item sunken-menu-item js-disable-pjax" data-gotokey="p" data-selected-links="repo_pulls /inikulin/parse5/pulls"> 34693fb6ee3Sopenharmony_ci<span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull Requests</span> 34793fb6ee3Sopenharmony_ci<span class="counter">0</span> 34893fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 34993fb6ee3Sopenharmony_ci</a> </li> 35093fb6ee3Sopenharmony_ci 35193fb6ee3Sopenharmony_ci 35293fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Wiki"> 35393fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/wiki" aria-label="Wiki" class="js-selected-navigation-item sunken-menu-item" data-pjax="true" data-selected-links="repo_wiki /inikulin/parse5/wiki"> 35493fb6ee3Sopenharmony_ci<span class="octicon octicon-book"></span> <span class="full-word">Wiki</span> 35593fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 35693fb6ee3Sopenharmony_ci</a> </li> 35793fb6ee3Sopenharmony_ci</ul> 35893fb6ee3Sopenharmony_ci<div class="sunken-menu-separator"></div> 35993fb6ee3Sopenharmony_ci<ul class="sunken-menu-group"> 36093fb6ee3Sopenharmony_ci 36193fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Pulse"> 36293fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-pjax="true" data-selected-links="pulse /inikulin/parse5/pulse"> 36393fb6ee3Sopenharmony_ci<span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span> 36493fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 36593fb6ee3Sopenharmony_ci</a> </li> 36693fb6ee3Sopenharmony_ci 36793fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Graphs"> 36893fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-pjax="true" data-selected-links="repo_graphs repo_contributors /inikulin/parse5/graphs"> 36993fb6ee3Sopenharmony_ci<span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span> 37093fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 37193fb6ee3Sopenharmony_ci</a> </li> 37293fb6ee3Sopenharmony_ci 37393fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Network"> 37493fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/network" aria-label="Network" class="js-selected-navigation-item sunken-menu-item js-disable-pjax" data-selected-links="repo_network /inikulin/parse5/network"> 37593fb6ee3Sopenharmony_ci<span class="octicon octicon-git-branch"></span> <span class="full-word">Network</span> 37693fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 37793fb6ee3Sopenharmony_ci</a> </li> 37893fb6ee3Sopenharmony_ci</ul> 37993fb6ee3Sopenharmony_ci 38093fb6ee3Sopenharmony_ci 38193fb6ee3Sopenharmony_ci<div class="sunken-menu-separator"></div> 38293fb6ee3Sopenharmony_ci<ul class="sunken-menu-group"> 38393fb6ee3Sopenharmony_ci<li class="tooltipped leftwards" title="Settings"> 38493fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/settings" class="sunken-menu-item" data-pjax="" aria-label="Settings"> 38593fb6ee3Sopenharmony_ci<span class="octicon octicon-tools"></span> <span class="full-word">Settings</span> 38693fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="mini-loader" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 38793fb6ee3Sopenharmony_ci</a> 38893fb6ee3Sopenharmony_ci</li> 38993fb6ee3Sopenharmony_ci</ul> 39093fb6ee3Sopenharmony_ci</div> 39193fb6ee3Sopenharmony_ci</div> 39293fb6ee3Sopenharmony_ci 39393fb6ee3Sopenharmony_ci<div class="only-with-full-nav"> 39493fb6ee3Sopenharmony_ci 39593fb6ee3Sopenharmony_ci 39693fb6ee3Sopenharmony_ci 39793fb6ee3Sopenharmony_ci 39893fb6ee3Sopenharmony_ci<div class="clone-url " data-protocol-type="http" data-url="/users/set_protocol?protocol_selector=http&protocol_type=push"> 39993fb6ee3Sopenharmony_ci<h3><strong>HTTPS</strong> clone URL</h3> 40093fb6ee3Sopenharmony_ci<div class="clone-url-box"> 40193fb6ee3Sopenharmony_ci<input type="text" class="clone js-url-field" value="https://github.com/inikulin/parse5.git" readonly="readonly"> 40293fb6ee3Sopenharmony_ci 40393fb6ee3Sopenharmony_ci<span class="js-zeroclipboard url-box-clippy minibutton zeroclipboard-button" data-clipboard-text="https://github.com/inikulin/parse5.git" data-copied-hint="copied!" title="copy to clipboard"><span class="octicon octicon-clippy"></span></span> 40493fb6ee3Sopenharmony_ci</div> 40593fb6ee3Sopenharmony_ci</div> 40693fb6ee3Sopenharmony_ci 40793fb6ee3Sopenharmony_ci 40893fb6ee3Sopenharmony_ci 40993fb6ee3Sopenharmony_ci<div class="clone-url " data-protocol-type="ssh" data-url="/users/set_protocol?protocol_selector=ssh&protocol_type=push"> 41093fb6ee3Sopenharmony_ci<h3><strong>SSH</strong> clone URL</h3> 41193fb6ee3Sopenharmony_ci<div class="clone-url-box"> 41293fb6ee3Sopenharmony_ci<input type="text" class="clone js-url-field" value="git@github.com:inikulin/parse5.git" readonly="readonly"> 41393fb6ee3Sopenharmony_ci 41493fb6ee3Sopenharmony_ci<span class="js-zeroclipboard url-box-clippy minibutton zeroclipboard-button" data-clipboard-text="git@github.com:inikulin/parse5.git" data-copied-hint="copied!" title="copy to clipboard"><span class="octicon octicon-clippy"></span></span> 41593fb6ee3Sopenharmony_ci</div> 41693fb6ee3Sopenharmony_ci</div> 41793fb6ee3Sopenharmony_ci 41893fb6ee3Sopenharmony_ci 41993fb6ee3Sopenharmony_ci 42093fb6ee3Sopenharmony_ci<div class="clone-url open" data-protocol-type="subversion" data-url="/users/set_protocol?protocol_selector=subversion&protocol_type=push"> 42193fb6ee3Sopenharmony_ci<h3><strong>Subversion</strong> checkout URL</h3> 42293fb6ee3Sopenharmony_ci<div class="clone-url-box"> 42393fb6ee3Sopenharmony_ci<input type="text" class="clone js-url-field" value="https://github.com/inikulin/parse5" readonly="readonly"> 42493fb6ee3Sopenharmony_ci 42593fb6ee3Sopenharmony_ci<span class="js-zeroclipboard url-box-clippy minibutton zeroclipboard-button" data-clipboard-text="https://github.com/inikulin/parse5" data-copied-hint="copied!" title="copy to clipboard"><span class="octicon octicon-clippy"></span></span> 42693fb6ee3Sopenharmony_ci</div> 42793fb6ee3Sopenharmony_ci</div> 42893fb6ee3Sopenharmony_ci 42993fb6ee3Sopenharmony_ci 43093fb6ee3Sopenharmony_ci<p class="clone-options">You can clone with 43193fb6ee3Sopenharmony_ci<a href="#" class="js-clone-selector" data-protocol="http">HTTPS</a>, 43293fb6ee3Sopenharmony_ci<a href="#" class="js-clone-selector" data-protocol="ssh">SSH</a>, 43393fb6ee3Sopenharmony_cior <a href="#" class="js-clone-selector" data-protocol="subversion">Subversion</a>. 43493fb6ee3Sopenharmony_ci<span class="octicon help tooltipped upwards" title="Get help on which URL is right for you."> 43593fb6ee3Sopenharmony_ci<a href="https://help.github.com/articles/which-remote-url-should-i-use"> 43693fb6ee3Sopenharmony_ci<span class="octicon octicon-question"></span> 43793fb6ee3Sopenharmony_ci</a> 43893fb6ee3Sopenharmony_ci</span> 43993fb6ee3Sopenharmony_ci</p> 44093fb6ee3Sopenharmony_ci 44193fb6ee3Sopenharmony_ci 44293fb6ee3Sopenharmony_ci<a href="http://windows.github.com" class="minibutton sidebar-button"> 44393fb6ee3Sopenharmony_ci<span class="octicon octicon-device-desktop"></span> 44493fb6ee3Sopenharmony_ciClone in Desktop 44593fb6ee3Sopenharmony_ci</a> 44693fb6ee3Sopenharmony_ci 44793fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/archive/master.zip" class="minibutton sidebar-button" title="Download this repository as a zip file" rel="nofollow"> 44893fb6ee3Sopenharmony_ci<span class="octicon octicon-cloud-download"></span> 44993fb6ee3Sopenharmony_ciDownload ZIP 45093fb6ee3Sopenharmony_ci</a> 45193fb6ee3Sopenharmony_ci</div> 45293fb6ee3Sopenharmony_ci</div><!-- /.repository-sidebar --> 45393fb6ee3Sopenharmony_ci 45493fb6ee3Sopenharmony_ci<div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container=""> 45593fb6ee3Sopenharmony_ci 45693fb6ee3Sopenharmony_ci 45793fb6ee3Sopenharmony_ci<span id="js-show-full-navigation"></span> 45893fb6ee3Sopenharmony_ci 45993fb6ee3Sopenharmony_ci<div class="repository-meta js-details-container "> 46093fb6ee3Sopenharmony_ci<div class="repository-description js-details-show"> 46193fb6ee3Sopenharmony_ci<p>Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification.</p> 46293fb6ee3Sopenharmony_ci</div> 46393fb6ee3Sopenharmony_ci 46493fb6ee3Sopenharmony_ci 46593fb6ee3Sopenharmony_ci<span class="edit-link js-details-show js-details-target">— <a href="#">Edit</a></span> 46693fb6ee3Sopenharmony_ci<form accept-charset="UTF-8" action="/inikulin/parse5/settings/update_meta" class="edit-repository-meta js-details-edit" method="post"><div style="margin:0;padding:0;display:inline"><input name="_method" type="hidden" value="put"><input name="authenticity_token" type="hidden" value="QCjdZSQ/aWGKiOknksU3UAanpjr415E/Uf5HPq07DzE="></div> 46793fb6ee3Sopenharmony_ci 46893fb6ee3Sopenharmony_ci<div class="field description-field"> 46993fb6ee3Sopenharmony_ci<label for="repo_description">Description</label> 47093fb6ee3Sopenharmony_ci<input type="text" name="repo_description" value="Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification." placeholder="Short description of this repository"> 47193fb6ee3Sopenharmony_ci</div> 47293fb6ee3Sopenharmony_ci 47393fb6ee3Sopenharmony_ci<div class="field website-field"> 47493fb6ee3Sopenharmony_ci<label for="repo_homepage">Website</label> 47593fb6ee3Sopenharmony_ci<input type="text" name="repo_homepage" value="" placeholder="Website for this repository (optional)"> 47693fb6ee3Sopenharmony_ci</div> 47793fb6ee3Sopenharmony_ci 47893fb6ee3Sopenharmony_ci<button class="button classy">Save</button> 47993fb6ee3Sopenharmony_ci<span class="cancel">or <a href="#" class="js-details-target">cancel</a></span> 48093fb6ee3Sopenharmony_ci</form> 48193fb6ee3Sopenharmony_ci</div> 48293fb6ee3Sopenharmony_ci 48393fb6ee3Sopenharmony_ci<div class="capped-box overall-summary "> 48493fb6ee3Sopenharmony_ci 48593fb6ee3Sopenharmony_ci<div class="stats-switcher-viewport js-stats-switcher-viewport"> 48693fb6ee3Sopenharmony_ci 48793fb6ee3Sopenharmony_ci<ul class="numbers-summary"> 48893fb6ee3Sopenharmony_ci<li class="commits"> 48993fb6ee3Sopenharmony_ci<a data-pjax="" href="/inikulin/parse5/commits/master"> 49093fb6ee3Sopenharmony_ci<span class="num"> 49193fb6ee3Sopenharmony_ci<span class="octicon octicon-history"></span> 49293fb6ee3Sopenharmony_ci149 49393fb6ee3Sopenharmony_ci</span> 49493fb6ee3Sopenharmony_cicommits 49593fb6ee3Sopenharmony_ci</a> 49693fb6ee3Sopenharmony_ci</li> 49793fb6ee3Sopenharmony_ci<li> 49893fb6ee3Sopenharmony_ci<a data-pjax="" href="/inikulin/parse5/branches"> 49993fb6ee3Sopenharmony_ci<span class="num"> 50093fb6ee3Sopenharmony_ci<span class="octicon octicon-git-branch"></span> 50193fb6ee3Sopenharmony_ci1 50293fb6ee3Sopenharmony_ci</span> 50393fb6ee3Sopenharmony_cibranch 50493fb6ee3Sopenharmony_ci</a> 50593fb6ee3Sopenharmony_ci</li> 50693fb6ee3Sopenharmony_ci 50793fb6ee3Sopenharmony_ci<li> 50893fb6ee3Sopenharmony_ci<a data-pjax="" href="/inikulin/parse5/releases"> 50993fb6ee3Sopenharmony_ci<span class="num"> 51093fb6ee3Sopenharmony_ci<span class="octicon octicon-tag"></span> 51193fb6ee3Sopenharmony_ci2 51293fb6ee3Sopenharmony_ci</span> 51393fb6ee3Sopenharmony_cireleases 51493fb6ee3Sopenharmony_ci</a> 51593fb6ee3Sopenharmony_ci</li> 51693fb6ee3Sopenharmony_ci 51793fb6ee3Sopenharmony_ci<li> 51893fb6ee3Sopenharmony_ci 51993fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/graphs/contributors"> 52093fb6ee3Sopenharmony_ci<span class="num"> 52193fb6ee3Sopenharmony_ci<span class="octicon octicon-organization"></span> 52293fb6ee3Sopenharmony_ci2 52393fb6ee3Sopenharmony_ci</span> 52493fb6ee3Sopenharmony_cicontributors 52593fb6ee3Sopenharmony_ci</a> 52693fb6ee3Sopenharmony_ci</li> 52793fb6ee3Sopenharmony_ci</ul> 52893fb6ee3Sopenharmony_ci 52993fb6ee3Sopenharmony_ci<div class="repository-lang-stats"> 53093fb6ee3Sopenharmony_ci<ol class="repository-lang-stats-numbers"> 53193fb6ee3Sopenharmony_ci<li> 53293fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/search?l=javascript"> 53393fb6ee3Sopenharmony_ci<span class="color-block language-color" style="background-color:#f15501;"></span> 53493fb6ee3Sopenharmony_ci<span class="lang">JavaScript</span> 53593fb6ee3Sopenharmony_ci<span class="percent">100%</span> 53693fb6ee3Sopenharmony_ci</a> 53793fb6ee3Sopenharmony_ci</li> 53893fb6ee3Sopenharmony_ci</ol> 53993fb6ee3Sopenharmony_ci</div> 54093fb6ee3Sopenharmony_ci</div> 54193fb6ee3Sopenharmony_ci 54293fb6ee3Sopenharmony_ci</div> 54393fb6ee3Sopenharmony_ci 54493fb6ee3Sopenharmony_ci<a href="#" class="repository-lang-stats-graph js-toggle-lang-stats tooltipped downwards" title="Show language statistics" style="background-color:#f15501"> 54593fb6ee3Sopenharmony_ci<span class="language-color" style="width:100%; background-color:#f15501;" itemprop="keywords">JavaScript</span> 54693fb6ee3Sopenharmony_ci</a> 54793fb6ee3Sopenharmony_ci 54893fb6ee3Sopenharmony_ci 54993fb6ee3Sopenharmony_ci<div> 55093fb6ee3Sopenharmony_ci</div> 55193fb6ee3Sopenharmony_ci 55293fb6ee3Sopenharmony_ci 55393fb6ee3Sopenharmony_ci<div class="file-navigation in-mid-page"> 55493fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/compare" aria-label="Compare, review, create a pull request" class="minibutton compact primary tooltipped downwards" title="Compare & review" data-pjax=""> 55593fb6ee3Sopenharmony_ci<span class="octicon octicon-git-compare"></span> 55693fb6ee3Sopenharmony_ci</a> 55793fb6ee3Sopenharmony_ci 55893fb6ee3Sopenharmony_ci 55993fb6ee3Sopenharmony_ci 56093fb6ee3Sopenharmony_ci<div class="select-menu js-menu-container js-select-menu"> 56193fb6ee3Sopenharmony_ci<span class="minibutton select-menu-button js-menu-target" data-hotkey="w" data-master-branch="master" data-ref="master" role="button" aria-label="Switch branches or tags" tabindex="0"> 56293fb6ee3Sopenharmony_ci<span class="octicon octicon-git-branch"></span> 56393fb6ee3Sopenharmony_ci<i>branch:</i> 56493fb6ee3Sopenharmony_ci<span class="js-select-button">master</span> 56593fb6ee3Sopenharmony_ci</span> 56693fb6ee3Sopenharmony_ci 56793fb6ee3Sopenharmony_ci<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax=""> 56893fb6ee3Sopenharmony_ci 56993fb6ee3Sopenharmony_ci<div class="select-menu-modal"> 57093fb6ee3Sopenharmony_ci<div class="select-menu-header"> 57193fb6ee3Sopenharmony_ci<span class="select-menu-title">Switch branches/tags</span> 57293fb6ee3Sopenharmony_ci<span class="octicon octicon-remove-close js-menu-close"></span> 57393fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-header --> 57493fb6ee3Sopenharmony_ci 57593fb6ee3Sopenharmony_ci<div class="select-menu-filters"> 57693fb6ee3Sopenharmony_ci<div class="select-menu-text-filter"> 57793fb6ee3Sopenharmony_ci<input type="text" aria-label="Find or create a branch…" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Find or create a branch…"> 57893fb6ee3Sopenharmony_ci</div> 57993fb6ee3Sopenharmony_ci<div class="select-menu-tabs"> 58093fb6ee3Sopenharmony_ci<ul> 58193fb6ee3Sopenharmony_ci<li class="select-menu-tab"> 58293fb6ee3Sopenharmony_ci<a href="#" data-tab-filter="branches" class="js-select-menu-tab">Branches</a> 58393fb6ee3Sopenharmony_ci</li> 58493fb6ee3Sopenharmony_ci<li class="select-menu-tab"> 58593fb6ee3Sopenharmony_ci<a href="#" data-tab-filter="tags" class="js-select-menu-tab">Tags</a> 58693fb6ee3Sopenharmony_ci</li> 58793fb6ee3Sopenharmony_ci</ul> 58893fb6ee3Sopenharmony_ci</div><!-- /.select-menu-tabs --> 58993fb6ee3Sopenharmony_ci</div><!-- /.select-menu-filters --> 59093fb6ee3Sopenharmony_ci 59193fb6ee3Sopenharmony_ci<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches"> 59293fb6ee3Sopenharmony_ci 59393fb6ee3Sopenharmony_ci<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> 59493fb6ee3Sopenharmony_ci 59593fb6ee3Sopenharmony_ci 59693fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item selected"> 59793fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 59893fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/tree/master" data-name="master" data-skip-pjax="true" rel="nofollow" class="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="master">master</a> 59993fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 60093fb6ee3Sopenharmony_ci</div> 60193fb6ee3Sopenharmony_ci 60293fb6ee3Sopenharmony_ci<form accept-charset="UTF-8" action="/inikulin/parse5/branches" class="js-create-branch select-menu-item select-menu-new-item-form js-navigation-item js-new-item-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="QCjdZSQ/aWGKiOknksU3UAanpjr415E/Uf5HPq07DzE="></div> 60393fb6ee3Sopenharmony_ci<span class="octicon octicon-git-branch-create select-menu-item-icon"></span> 60493fb6ee3Sopenharmony_ci<div class="select-menu-item-text"> 60593fb6ee3Sopenharmony_ci<h4>Create branch: <span class="js-new-item-name"></span></h4> 60693fb6ee3Sopenharmony_ci<span class="description">from ‘master’</span> 60793fb6ee3Sopenharmony_ci</div> 60893fb6ee3Sopenharmony_ci<input type="hidden" name="name" id="name" class="js-new-item-value"> 60993fb6ee3Sopenharmony_ci<input type="hidden" name="branch" id="branch" value="master"> 61093fb6ee3Sopenharmony_ci<input type="hidden" name="path" id="path" value=""> 61193fb6ee3Sopenharmony_ci</form> <!-- /.select-menu-item --> 61293fb6ee3Sopenharmony_ci 61393fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-list --> 61493fb6ee3Sopenharmony_ci 61593fb6ee3Sopenharmony_ci<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags"> 61693fb6ee3Sopenharmony_ci<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> 61793fb6ee3Sopenharmony_ci 61893fb6ee3Sopenharmony_ci 61993fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item "> 62093fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 62193fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/tree/v0.6.0" data-name="v0.6.0" data-skip-pjax="true" rel="nofollow" class="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="v0.6.0">v0.6.0</a> 62293fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 62393fb6ee3Sopenharmony_ci<div class="select-menu-item js-navigation-item "> 62493fb6ee3Sopenharmony_ci<span class="select-menu-item-icon octicon octicon-check"></span> 62593fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/tree/0.6.1" data-name="0.6.1" data-skip-pjax="true" rel="nofollow" class="js-navigation-open select-menu-item-text js-select-button-text css-truncate-target" title="0.6.1">0.6.1</a> 62693fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-item --> 62793fb6ee3Sopenharmony_ci</div> 62893fb6ee3Sopenharmony_ci 62993fb6ee3Sopenharmony_ci<div class="select-menu-no-results">Nothing to show</div> 63093fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-list --> 63193fb6ee3Sopenharmony_ci 63293fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-modal --> 63393fb6ee3Sopenharmony_ci</div> <!-- /.select-menu-modal-holder --> 63493fb6ee3Sopenharmony_ci</div> <!-- /.select-menu --> 63593fb6ee3Sopenharmony_ci 63693fb6ee3Sopenharmony_ci 63793fb6ee3Sopenharmony_ci<div class="breadcrumb"><span class="repo-root js-repo-root"><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/inikulin/parse5" data-branch="master" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">parse5</span></a></span></span><span class="separator"> / </span><form action="/inikulin/parse5/new/master" class="js-new-blob-form tooltipped rightwards new-file-link" method="post" title="Create a new file here"><span aria-label="Create a new file here" class="js-new-blob-submit octicon octicon-file-add" data-test-id="create-new-git-file" role="button"></span></form></div> 63893fb6ee3Sopenharmony_ci</div> 63993fb6ee3Sopenharmony_ci 64093fb6ee3Sopenharmony_ci 64193fb6ee3Sopenharmony_ci 64293fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/find/master" data-hotkey="t" class="js-show-file-finder" style="display:none" data-pjax="">Show File Finder</a> 64393fb6ee3Sopenharmony_ci<div class="bubble files-bubble"> 64493fb6ee3Sopenharmony_ci 64593fb6ee3Sopenharmony_ci 64693fb6ee3Sopenharmony_ci<div class="commit commit-tease js-details-container"> 64793fb6ee3Sopenharmony_ci<p class="commit-title "> 64893fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/commit/33972193530003cbaf24c3cdde4ab2d3c94ede67" class="message" data-pjax="true" title="htmlparser2 tree adapter tested">htmlparser2 tree adapter tested</a> 64993fb6ee3Sopenharmony_ci 65093fb6ee3Sopenharmony_ci</p> 65193fb6ee3Sopenharmony_ci<div class="commit-meta"> 65293fb6ee3Sopenharmony_ci<span class="js-zeroclipboard zeroclipboard-link" data-clipboard-text="33972193530003cbaf24c3cdde4ab2d3c94ede67" data-copied-hint="copied!" title="Copy SHA"><span class="octicon octicon-clippy"></span></span> 65393fb6ee3Sopenharmony_ci<a href="/inikulin/parse5/commit/33972193530003cbaf24c3cdde4ab2d3c94ede67" class="sha-block" data-pjax="">latest commit <span class="sha">3397219353</span></a> 65493fb6ee3Sopenharmony_ci 65593fb6ee3Sopenharmony_ci<div class="authorship"> 65693fb6ee3Sopenharmony_ci<img alt="Ivan Nikulin" class="gravatar" height="20" src="https://2.gravatar.com/avatar/64ee497c4a533144a9bf9ce2a6c010c5?d=https%3A%2F%2Fidenticons.github.com%2F9dd4dc5634e3d3d97c7d5a34ba28b850.png&r=x&s=140" width="20"> 65793fb6ee3Sopenharmony_ci<span class="author-name"><a href="/inikulin" data-skip-pjax="true" rel="author">inikulin</a></span> 65893fb6ee3Sopenharmony_ciauthored <time class="js-relative-date updated" datetime="2014-01-27T02:02:50-08:00" title="2014-01-27 02:02:50">January 27, 2014</time> 65993fb6ee3Sopenharmony_ci 66093fb6ee3Sopenharmony_ci</div> 66193fb6ee3Sopenharmony_ci</div> 66293fb6ee3Sopenharmony_ci</div> 66393fb6ee3Sopenharmony_ci 66493fb6ee3Sopenharmony_ci<table class="files" data-pjax=""> 66593fb6ee3Sopenharmony_ci 66693fb6ee3Sopenharmony_ci 66793fb6ee3Sopenharmony_ci<tbody class="" data-url="/inikulin/parse5/file-list/master"> 66893fb6ee3Sopenharmony_ci<tr> 66993fb6ee3Sopenharmony_ci<td class="icon"> 67093fb6ee3Sopenharmony_ci<span class="octicon octicon-file-directory"></span> 67193fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 67293fb6ee3Sopenharmony_ci</td> 67393fb6ee3Sopenharmony_ci<td class="content"> 67493fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/tree/master/lib" class="js-directory-link" id="e8acc63b1e238f3255c900eed37254b8-9c0e11982fee8ec9905328a0f1255880895ebce8" title="lib">lib</a></span> 67593fb6ee3Sopenharmony_ci</td> 67693fb6ee3Sopenharmony_ci<td class="message"> 67793fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33972193530003cbaf24c3cdde4ab2d3c94ede67" class="message" data-pjax="true" title="htmlparser2 tree adapter tested">htmlparser2 tree adapter tested</a></span> 67893fb6ee3Sopenharmony_ci</td> 67993fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2014-01-27T02:02:50-08:00" title="2014-01-27 02:02:50">January 27, 2014</time></span></td> 68093fb6ee3Sopenharmony_ci</tr> 68193fb6ee3Sopenharmony_ci<tr> 68293fb6ee3Sopenharmony_ci<td class="icon"> 68393fb6ee3Sopenharmony_ci<span class="octicon octicon-file-directory"></span> 68493fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 68593fb6ee3Sopenharmony_ci</td> 68693fb6ee3Sopenharmony_ci<td class="content"> 68793fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/tree/master/test" class="js-directory-link" id="098f6bcd4621d373cade4e832627b4f6-e8d4326833c08a6731851e4f79dc8b3a172ed1fc" title="test">test</a></span> 68893fb6ee3Sopenharmony_ci</td> 68993fb6ee3Sopenharmony_ci<td class="message"> 69093fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33972193530003cbaf24c3cdde4ab2d3c94ede67" class="message" data-pjax="true" title="htmlparser2 tree adapter tested">htmlparser2 tree adapter tested</a></span> 69193fb6ee3Sopenharmony_ci</td> 69293fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2014-01-27T02:02:50-08:00" title="2014-01-27 02:02:50">January 27, 2014</time></span></td> 69393fb6ee3Sopenharmony_ci</tr> 69493fb6ee3Sopenharmony_ci<tr> 69593fb6ee3Sopenharmony_ci<td class="icon"> 69693fb6ee3Sopenharmony_ci<span class="octicon octicon-file-text"></span> 69793fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 69893fb6ee3Sopenharmony_ci</td> 69993fb6ee3Sopenharmony_ci<td class="content"> 70093fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/.gitignore" class="js-directory-link" id="a084b794bc0759e7a6b77810e01874f2-00943223614db1f9c2386227950a3d84120819f4" title=".gitignore">.gitignore</a></span> 70193fb6ee3Sopenharmony_ci</td> 70293fb6ee3Sopenharmony_ci<td class="message"> 70393fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33c5522146f1b48054259848cf711aebbe133337" class="message" data-pjax="true" title="Merge">Merge</a></span> 70493fb6ee3Sopenharmony_ci</td> 70593fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2013-07-15T09:33:17-07:00" title="2013-07-15 09:33:17">July 15, 2013</time></span></td> 70693fb6ee3Sopenharmony_ci</tr> 70793fb6ee3Sopenharmony_ci<tr> 70893fb6ee3Sopenharmony_ci<td class="icon"> 70993fb6ee3Sopenharmony_ci<span class="octicon octicon-file-text"></span> 71093fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 71193fb6ee3Sopenharmony_ci</td> 71293fb6ee3Sopenharmony_ci<td class="content"> 71393fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/LICENSE" class="js-directory-link" id="9879d6db96fd29134fc802214163b95a-6c630a0871e8239761813ac074c17882060b73a6" title="LICENSE">LICENSE</a></span> 71493fb6ee3Sopenharmony_ci</td> 71593fb6ee3Sopenharmony_ci<td class="message"> 71693fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/33c5522146f1b48054259848cf711aebbe133337" class="message" data-pjax="true" title="Merge">Merge</a></span> 71793fb6ee3Sopenharmony_ci</td> 71893fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2013-07-15T09:33:17-07:00" title="2013-07-15 09:33:17">July 15, 2013</time></span></td> 71993fb6ee3Sopenharmony_ci</tr> 72093fb6ee3Sopenharmony_ci<tr> 72193fb6ee3Sopenharmony_ci<td class="icon"> 72293fb6ee3Sopenharmony_ci<span class="octicon octicon-file-text"></span> 72393fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 72493fb6ee3Sopenharmony_ci</td> 72593fb6ee3Sopenharmony_ci<td class="content"> 72693fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/README.md" class="js-directory-link" id="04c6e90faac2675aa89e2176d2eec7d8-414202e1799908d7727efbcbb9fe2e58ef42d114" title="README.md">README.md</a></span> 72793fb6ee3Sopenharmony_ci</td> 72893fb6ee3Sopenharmony_ci<td class="message"> 72993fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/6c541498d323cc6130d098f242ebc10132ad1eaa" class="message" data-pjax="true" title="Add a Bitdeli badge to README">Add a Bitdeli badge to README</a></span> 73093fb6ee3Sopenharmony_ci</td> 73193fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2013-12-10T07:33:31-08:00" title="2013-12-10 07:33:31">December 10, 2013</time></span></td> 73293fb6ee3Sopenharmony_ci</tr> 73393fb6ee3Sopenharmony_ci<tr> 73493fb6ee3Sopenharmony_ci<td class="icon"> 73593fb6ee3Sopenharmony_ci<span class="octicon octicon-file-text"></span> 73693fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 73793fb6ee3Sopenharmony_ci</td> 73893fb6ee3Sopenharmony_ci<td class="content"> 73993fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/index.js" class="js-directory-link" id="168726dbe96b3ce427e7fedce31bb0bc-423b9a1511e0e8d8e43434febcbccca62671df19" title="index.js">index.js</a></span> 74093fb6ee3Sopenharmony_ci</td> 74193fb6ee3Sopenharmony_ci<td class="message"> 74293fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/e7af4374108276796a9991d49278429eb33293ab" class="message" data-pjax="true" title="Implementation of the htmlparser2 tree support started">Implementation of the htmlparser2 tree support started</a></span> 74393fb6ee3Sopenharmony_ci</td> 74493fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2014-01-24T04:11:52-08:00" title="2014-01-24 04:11:52">January 24, 2014</time></span></td> 74593fb6ee3Sopenharmony_ci</tr> 74693fb6ee3Sopenharmony_ci<tr> 74793fb6ee3Sopenharmony_ci<td class="icon"> 74893fb6ee3Sopenharmony_ci<span class="octicon octicon-file-text"></span> 74993fb6ee3Sopenharmony_ci<img alt="Octocat-spinner-32" class="spinner" height="16" src="https://github.global.ssl.fastly.net/images/spinners/octocat-spinner-32.gif" width="16"> 75093fb6ee3Sopenharmony_ci</td> 75193fb6ee3Sopenharmony_ci<td class="content"> 75293fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/blob/master/package.json" class="js-directory-link" id="b9cfc7f2cdf78a7f4b91a753d10865a2-99397a1dd31332b9a64d9af9cf32b7340a600f92" title="package.json">package.json</a></span> 75393fb6ee3Sopenharmony_ci</td> 75493fb6ee3Sopenharmony_ci<td class="message"> 75593fb6ee3Sopenharmony_ci<span class="css-truncate css-truncate-target"><a href="/inikulin/parse5/commit/b8d56257897357e655a71ba21d4bd40e12b33230" class="message" data-pjax="true" title="Expose Tokenizer">Expose Tokenizer</a></span> 75693fb6ee3Sopenharmony_ci</td> 75793fb6ee3Sopenharmony_ci<td class="age"><span class="css-truncate css-truncate-target"><time class="js-relative-date" datetime="2014-01-24T01:27:43-08:00" title="2014-01-24 01:27:43">January 24, 2014</time></span></td> 75893fb6ee3Sopenharmony_ci</tr> 75993fb6ee3Sopenharmony_ci</tbody> 76093fb6ee3Sopenharmony_ci 76193fb6ee3Sopenharmony_ci</table> 76293fb6ee3Sopenharmony_ci</div> 76393fb6ee3Sopenharmony_ci 76493fb6ee3Sopenharmony_ci<div id="readme" class="clearfix announce instapaper_body md"> 76593fb6ee3Sopenharmony_ci<span class="name"> 76693fb6ee3Sopenharmony_ci<span class="octicon octicon-book"></span> 76793fb6ee3Sopenharmony_ciREADME.md 76893fb6ee3Sopenharmony_ci</span> 76993fb6ee3Sopenharmony_ci 77093fb6ee3Sopenharmony_ci<article class="markdown-body entry-content" itemprop="mainContentOfPage"><h1> 77193fb6ee3Sopenharmony_ci<a name="parse5" class="anchor" href="#parse5"><span class="octicon octicon-link"></span></a>parse5</h1> 77293fb6ee3Sopenharmony_ci 77393fb6ee3Sopenharmony_ci<p>Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification.<br> 77493fb6ee3Sopenharmony_ciTo build <a href="http://testcafe.devexpress.com/">TestCafé</a> we needed fast and ready for production HTML parser for node.js, which will parse HTML as a modern browser's parser. 77593fb6ee3Sopenharmony_ciExisting solutions were either too slow or their output was too inaccurate. So, this is how parse5 was born.</p> 77693fb6ee3Sopenharmony_ci 77793fb6ee3Sopenharmony_ci<h2> 77893fb6ee3Sopenharmony_ci<a name="install" class="anchor" href="#install"><span class="octicon octicon-link"></span></a>Install</h2> 77993fb6ee3Sopenharmony_ci 78093fb6ee3Sopenharmony_ci<pre><code>$ npm install parse5 78193fb6ee3Sopenharmony_ci</code></pre> 78293fb6ee3Sopenharmony_ci 78393fb6ee3Sopenharmony_ci<h2> 78493fb6ee3Sopenharmony_ci<a name="usage-and-api" class="anchor" href="#usage-and-api"><span class="octicon octicon-link"></span></a>Usage and API</h2> 78593fb6ee3Sopenharmony_ci 78693fb6ee3Sopenharmony_ci<div class="highlight highlight-js"><pre><span class="kd">var</span> <span class="nx">Parser</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'parse5'</span><span class="p">).</span><span class="nx">Parser</span><span class="p">;</span> 78793fb6ee3Sopenharmony_ci 78893fb6ee3Sopenharmony_ci<span class="c1">//Instantiate parser</span> 78993fb6ee3Sopenharmony_ci<span class="kd">var</span> <span class="nx">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Parser</span><span class="p">();</span> 79093fb6ee3Sopenharmony_ci 79193fb6ee3Sopenharmony_ci<span class="c1">//Then feed it with an HTML document</span> 79293fb6ee3Sopenharmony_ci<span class="kd">var</span> <span class="nb">document</span> <span class="o">=</span> <span class="nx">parser</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="s1">'<!DOCTYPE html><html><head></head><body>Hi there!</body></html>'</span><span class="p">)</span> 79393fb6ee3Sopenharmony_ci 79493fb6ee3Sopenharmony_ci<span class="c1">//Now let's parse HTML-snippet</span> 79593fb6ee3Sopenharmony_ci<span class="kd">var</span> <span class="nx">fragment</span> <span class="o">=</span> <span class="nx">parser</span><span class="p">.</span><span class="nx">parseFragment</span><span class="p">(</span><span class="s1">'<title>Parse5 is &#102;&#117;&#99;&#107;ing awesome!</title><h1>42</h1>'</span><span class="p">);</span> 79693fb6ee3Sopenharmony_ci 79793fb6ee3Sopenharmony_ci</pre></div> 79893fb6ee3Sopenharmony_ci 79993fb6ee3Sopenharmony_ci<h2> 80093fb6ee3Sopenharmony_ci<a name="is-it-fast" class="anchor" href="#is-it-fast"><span class="octicon octicon-link"></span></a>Is it fast?</h2> 80193fb6ee3Sopenharmony_ci 80293fb6ee3Sopenharmony_ci<p>Check out <a href="https://github.com/inikulin/node-html-parser-bench">this benchmark</a>.</p> 80393fb6ee3Sopenharmony_ci 80493fb6ee3Sopenharmony_ci<pre><code>Starting benchmark. Fasten your seatbelts... 80593fb6ee3Sopenharmony_cihtml5 (https://github.com/aredridel/html5) x 0.18 ops/sec ±5.92% (5 runs sampled) 80693fb6ee3Sopenharmony_cihtmlparser (https://github.com/tautologistics/node-htmlparser/) x 3.83 ops/sec ±42.43% (14 runs sampled) 80793fb6ee3Sopenharmony_cihtmlparser2 (https://github.com/fb55/htmlparser2) x 4.05 ops/sec ±39.27% (15 runs sampled) 80893fb6ee3Sopenharmony_ciparse5 (https://github.com/inikulin/parse5) x 3.04 ops/sec ±51.81% (13 runs sampled) 80993fb6ee3Sopenharmony_ciFastest is htmlparser2 (https://github.com/fb55/htmlparser2),parse5 (https://github.com/inikulin/parse5) 81093fb6ee3Sopenharmony_ci</code></pre> 81193fb6ee3Sopenharmony_ci 81293fb6ee3Sopenharmony_ci<p>So, parse5 is as fast as simple specification incompatible parsers and ~15-times(!) faster than the current specification compatible parser available for the node.</p> 81393fb6ee3Sopenharmony_ci 81493fb6ee3Sopenharmony_ci<h2> 81593fb6ee3Sopenharmony_ci<a name="testing" class="anchor" href="#testing"><span class="octicon octicon-link"></span></a>Testing</h2> 81693fb6ee3Sopenharmony_ci 81793fb6ee3Sopenharmony_ci<p>Test data is adopted from <a href="https://github.com/html5lib">html5lib project</a>. Parser is covered by more than 8000 test cases. 81893fb6ee3Sopenharmony_ciTo run tests:</p> 81993fb6ee3Sopenharmony_ci 82093fb6ee3Sopenharmony_ci<pre><code>$ node test/run_tests.js 82193fb6ee3Sopenharmony_ci</code></pre> 82293fb6ee3Sopenharmony_ci 82393fb6ee3Sopenharmony_ci<h2> 82493fb6ee3Sopenharmony_ci<a name="custom-tree-adapter" class="anchor" href="#custom-tree-adapter"><span class="octicon octicon-link"></span></a>Custom tree adapter</h2> 82593fb6ee3Sopenharmony_ci 82693fb6ee3Sopenharmony_ci<p>You can create a custom tree adapter so parse5 can work with your own DOM-tree implementation. 82793fb6ee3Sopenharmony_ciJust pass your adapter implementation to the parser's constructor as an argument:</p> 82893fb6ee3Sopenharmony_ci 82993fb6ee3Sopenharmony_ci<div class="highlight highlight-js"><pre><span class="kd">var</span> <span class="nx">Parser</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'parse5'</span><span class="p">).</span><span class="nx">Parser</span><span class="p">;</span> 83093fb6ee3Sopenharmony_ci 83193fb6ee3Sopenharmony_ci<span class="kd">var</span> <span class="nx">myTreeAdapter</span> <span class="o">=</span> <span class="p">{</span> 83293fb6ee3Sopenharmony_ci<span class="c1">//Adapter methods...</span> 83393fb6ee3Sopenharmony_ci<span class="p">};</span> 83493fb6ee3Sopenharmony_ci 83593fb6ee3Sopenharmony_ci<span class="c1">//Instantiate parser</span> 83693fb6ee3Sopenharmony_ci<span class="kd">var</span> <span class="nx">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Parser</span><span class="p">(</span><span class="nx">myTreeAdapter</span><span class="p">);</span> 83793fb6ee3Sopenharmony_ci</pre></div> 83893fb6ee3Sopenharmony_ci 83993fb6ee3Sopenharmony_ci<p>Sample implementation can be found <a href="https://github.com/inikulin/parse5/blob/master/lib/default_tree_adapter.js">here</a>. 84093fb6ee3Sopenharmony_ciThe custom tree adapter should implement all methods exposed via <code>exports</code> in the sample implementation.</p> 84193fb6ee3Sopenharmony_ci 84293fb6ee3Sopenharmony_ci<h2> 84393fb6ee3Sopenharmony_ci<a name="questions-or-suggestions" class="anchor" href="#questions-or-suggestions"><span class="octicon octicon-link"></span></a>Questions or suggestions?</h2> 84493fb6ee3Sopenharmony_ci 84593fb6ee3Sopenharmony_ci<p>If you have any questions, please feel free to create an issue <a href="https://github.com/inikulin/parse5/issues">here on github</a>.</p> 84693fb6ee3Sopenharmony_ci 84793fb6ee3Sopenharmony_ci<h2> 84893fb6ee3Sopenharmony_ci<a name="author" class="anchor" href="#author"><span class="octicon octicon-link"></span></a>Author</h2> 84993fb6ee3Sopenharmony_ci 85093fb6ee3Sopenharmony_ci<p><a href="https://github.com/inikulin">Ivan Nikulin</a> (<a href="mailto:ifaaan@gmail.com">ifaaan@gmail.com</a>)</p> 85193fb6ee3Sopenharmony_ci 85293fb6ee3Sopenharmony_ci<p><a href="https://bitdeli.com/free" title="Bitdeli Badge"><img src="https://d2weczhvl823v0.cloudfront.net/inikulin/parse5/trend.png" alt="Bitdeli Badge" style="max-width:100%;"></a></p></article> 85393fb6ee3Sopenharmony_ci</div> 85493fb6ee3Sopenharmony_ci 85593fb6ee3Sopenharmony_ci 85693fb6ee3Sopenharmony_ci</div> 85793fb6ee3Sopenharmony_ci 85893fb6ee3Sopenharmony_ci</div><!-- /.repo-container --> 85993fb6ee3Sopenharmony_ci<div class="modal-backdrop"></div> 86093fb6ee3Sopenharmony_ci</div><!-- /.container --> 86193fb6ee3Sopenharmony_ci</div><!-- /.site --> 86293fb6ee3Sopenharmony_ci 86393fb6ee3Sopenharmony_ci 86493fb6ee3Sopenharmony_ci</div><!-- /.wrapper --> 86593fb6ee3Sopenharmony_ci 86693fb6ee3Sopenharmony_ci<div class="container"> 86793fb6ee3Sopenharmony_ci<div class="site-footer"> 86893fb6ee3Sopenharmony_ci<ul class="site-footer-links right"> 86993fb6ee3Sopenharmony_ci<li><a href="https://status.github.com/">Status</a></li> 87093fb6ee3Sopenharmony_ci<li><a href="http://developer.github.com">API</a></li> 87193fb6ee3Sopenharmony_ci<li><a href="http://training.github.com">Training</a></li> 87293fb6ee3Sopenharmony_ci<li><a href="http://shop.github.com">Shop</a></li> 87393fb6ee3Sopenharmony_ci<li><a href="/blog">Blog</a></li> 87493fb6ee3Sopenharmony_ci<li><a href="/about">About</a></li> 87593fb6ee3Sopenharmony_ci 87693fb6ee3Sopenharmony_ci</ul> 87793fb6ee3Sopenharmony_ci 87893fb6ee3Sopenharmony_ci<a href="/"> 87993fb6ee3Sopenharmony_ci<span class="mega-octicon octicon-mark-github" title="GitHub"></span> 88093fb6ee3Sopenharmony_ci</a> 88193fb6ee3Sopenharmony_ci 88293fb6ee3Sopenharmony_ci<ul class="site-footer-links"> 88393fb6ee3Sopenharmony_ci<li>© 2014 <span title="0.04649s from github-fe139-cp1-prd.iad.github.net">GitHub</span>, Inc.</li> 88493fb6ee3Sopenharmony_ci<li><a href="/site/terms">Terms</a></li> 88593fb6ee3Sopenharmony_ci<li><a href="/site/privacy">Privacy</a></li> 88693fb6ee3Sopenharmony_ci<li><a href="/security">Security</a></li> 88793fb6ee3Sopenharmony_ci<li><a href="/contact">Contact</a></li> 88893fb6ee3Sopenharmony_ci</ul> 88993fb6ee3Sopenharmony_ci</div><!-- /.site-footer --> 89093fb6ee3Sopenharmony_ci</div><!-- /.container --> 89193fb6ee3Sopenharmony_ci 89293fb6ee3Sopenharmony_ci 89393fb6ee3Sopenharmony_ci<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay"> 89493fb6ee3Sopenharmony_ci<div class="fullscreen-container js-fullscreen-container"> 89593fb6ee3Sopenharmony_ci<div class="textarea-wrap"> 89693fb6ee3Sopenharmony_ci<textarea name="fullscreen-contents" id="fullscreen-contents" class="js-fullscreen-contents" placeholder="" data-suggester="fullscreen_suggester"></textarea> 89793fb6ee3Sopenharmony_ci<div class="suggester-container"> 89893fb6ee3Sopenharmony_ci<div class="suggester fullscreen-suggester js-navigation-container" id="fullscreen_suggester" data-url="/inikulin/parse5/suggestions/commit"> 89993fb6ee3Sopenharmony_ci</div> 90093fb6ee3Sopenharmony_ci</div> 90193fb6ee3Sopenharmony_ci</div> 90293fb6ee3Sopenharmony_ci</div> 90393fb6ee3Sopenharmony_ci<div class="fullscreen-sidebar"> 90493fb6ee3Sopenharmony_ci<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped leftwards" title="Exit Zen Mode"> 90593fb6ee3Sopenharmony_ci<span class="mega-octicon octicon-screen-normal"></span> 90693fb6ee3Sopenharmony_ci</a> 90793fb6ee3Sopenharmony_ci<a href="#" class="theme-switcher js-theme-switcher tooltipped leftwards" title="Switch themes"> 90893fb6ee3Sopenharmony_ci<span class="octicon octicon-color-mode"></span> 90993fb6ee3Sopenharmony_ci</a> 91093fb6ee3Sopenharmony_ci</div> 91193fb6ee3Sopenharmony_ci</div> 91293fb6ee3Sopenharmony_ci 91393fb6ee3Sopenharmony_ci 91493fb6ee3Sopenharmony_ci 91593fb6ee3Sopenharmony_ci<div id="ajax-error-message" class="flash flash-error"> 91693fb6ee3Sopenharmony_ci<span class="octicon octicon-alert"></span> 91793fb6ee3Sopenharmony_ci<a href="#" class="octicon octicon-remove-close close js-ajax-error-dismiss"></a> 91893fb6ee3Sopenharmony_ciSomething went wrong with that request. Please try again. 91993fb6ee3Sopenharmony_ci</div> 92093fb6ee3Sopenharmony_ci 92193fb6ee3Sopenharmony_ci 92293fb6ee3Sopenharmony_ci 92393fb6ee3Sopenharmony_ci 92493fb6ee3Sopenharmony_ci</body></html>