All Projects → henryluki → html-parser

henryluki / html-parser

Licence: MIT license
Simple HTML to JSON parser use Regexp and String.indexOf

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to html-parser

Wxparse
微信小程序富文本解析
Stars: ✭ 135 (+297.06%)
Mutual labels:  html-parser
Kanna
Kanna(鉋) is an XML/HTML parser for Swift.
Stars: ✭ 2,227 (+6450%)
Mutual labels:  html-parser
Prettyhtml
💅 The formatter for the modern web https://prettyhtml.netlify.com/
Stars: ✭ 241 (+608.82%)
Mutual labels:  html-parser
Nsoup
NSoup is a .NET port of the jsoup (http://jsoup.org) HTML parser and sanitizer originally written in Java
Stars: ✭ 145 (+326.47%)
Mutual labels:  html-parser
Pywebcopy
Python library to mirror webpage and websites.
Stars: ✭ 156 (+358.82%)
Mutual labels:  html-parser
React Native Htmlview
A React Native component which renders HTML content as native views
Stars: ✭ 2,546 (+7388.24%)
Mutual labels:  html-parser
Lua Gumbo
Moved to https://gitlab.com/craigbarnes/lua-gumbo
Stars: ✭ 116 (+241.18%)
Mutual labels:  html-parser
bkit
build a messenger bot using HTML
Stars: ✭ 36 (+5.88%)
Mutual labels:  html-parser
Unhtml.rs
A magic html parser
Stars: ✭ 180 (+429.41%)
Mutual labels:  html-parser
Webpageparser
A delightful xml and html parsing relish for iOS
Stars: ✭ 236 (+594.12%)
Mutual labels:  html-parser
Minimize
Minimize HTML
Stars: ✭ 150 (+341.18%)
Mutual labels:  html-parser
Didom
Simple and fast HTML and XML parser
Stars: ✭ 1,939 (+5602.94%)
Mutual labels:  html-parser
Posthtml
PostHTML is a tool to transform HTML/XML with JS plugins
Stars: ✭ 2,737 (+7950%)
Mutual labels:  html-parser
Autocser
AutoCSer is a high-performance RPC framework. AutoCSer 是一个以高效率为目标向导的整体开发框架。主要包括 TCP 接口服务框架、TCP 函数服务框架、远程表达式链组件、前后端一体 WEB 视图框架、ORM 内存索引缓存框架、日志流内存数据库缓存组件、消息队列组件、二进制 / JSON / XML 数据序列化 等一系列无缝集成的高性能组件。
Stars: ✭ 140 (+311.76%)
Mutual labels:  html-parser
html-parser
A simple and general purpose html/xhtml parser, using Pest.
Stars: ✭ 56 (+64.71%)
Mutual labels:  html-parser
Harser
Easy way for HTML parsing and building XPath
Stars: ✭ 135 (+297.06%)
Mutual labels:  html-parser
Nokogiri
HTML parser for PHP - Парсер HTML
Stars: ✭ 214 (+529.41%)
Mutual labels:  html-parser
DHTMLParser
D HTML Parser, similar to python BeautifulSoup
Stars: ✭ 17 (-50%)
Mutual labels:  html-parser
html5parser
A super tiny and fast html5 AST parser.
Stars: ✭ 153 (+350%)
Mutual labels:  html-parser
Skrape.it
A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML (server & client-side rendered). It places particular emphasis on ease of use and a high level of readability by providing an intuitive DSL. It aims to be a testing lib, but can also be used to scrape websites in a convenient fashion.
Stars: ✭ 231 (+579.41%)
Mutual labels:  html-parser

html-parser

Simple HTML to JSON parser use Regexp and String.indexOf

Install

npm install htmlstr-parser

Basic usage

var html = "<div style='height:10rpx;width: 20rpx;'>1<p>2<br/><a href='http://www.baidu.com'>3</a></p><p>2</p></div>"
htmlParser(html)

Output

{
  "tag": "root",
  "children": [{
    "type": "Element",
    "tagName": "div",
    "attributes": {
      "style": "height:10rpx;width: 20rpx;"
    },
    "children": [{
      "type": "Text",
      "content": "1"
    }, {
      "type": "Element",
      "tagName": "p",
      "attributes": {},
      "children": [{
        "type": "Text",
        "content": "2"
      }, {
        "type": "Element",
        "tagName": "br"
      }, {
        "type": "Element",
        "tagName": "a",
        "attributes": {
          "href": "http://www.baidu.com"
        },
        "children": [{
          "type": "Text",
          "content": "3"
        }]
      }]
    }, {
      "type": "Element",
      "tagName": "p",
      "attributes": {},
      "children": [{
        "type": "Text",
        "content": "2"
      }]
    }]
  }]
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].