Git Product home page Git Product logo

htmlparser's Introduction

HTMLParser

A simple, easy to use HTML parser written in C++ with functionality similar to JSoup.

Installation:

There is no platform-dependent code in this project. It will compile on any system that can run g++. It has been tested with g++ 4.9.3 under linux, as well as g++ 6.1.0 using MinGW on Windows 7. To compile, type

make

How to use:

In its current stage, this program will only analyze your HTML file. It will print out a list of the tags in the order that they appear, and will indent them to exhibit its parent/child tags. In addition, the program will print out how many of each tag are in the HTML file. This program is in a pre-alpha stage, and its functionality is extremely limited.

Latest update: 12/9/16

  • Fixed attribute bug

Known Bugs:

  • The program will crash if two similarly-nested tags exist.

Example of an error-causing HTML file:

<head>
	<title></title>
	<meta></meta>
</head>

<body>
	<h1>Welcome to old navy</h1>
	<p><b>Here we have chicken</b></p>
	<p><b><i>COME TO OLD NAVY TODAY</i></b></p>
	
</body>

To be implemented:

  • Attribute lists
  • Get all elements of a type

The program will work if you take out the i tag. I am currently working to fix this issue.

htmlparser's People

Contributors

jheinz1999 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.