Home » Linux » Text Editing & Processing » Markup » HTML Parser 1.6-20060610
 
 

HTML Parser 1.6-20060610

HTMLParser is super-fast real-time parser for real-world HTML. What has attracted most developers to HTMLParser has been its simplicity in design, speed and ability to handle streaming real-world html.

The two fundamental use-cases that are handled by the parser are extraction and transformation (the syntheses use-case, where HTML pages are created from scratch, is better handled by other tools closer to the source of data). While prior versions concentrated on data extraction from web pages, Version 1.4 of the HTMLParser has substantial improvements in the area of transforming web pages, with simplified tag creation and editing, and verbatim toHtml() method output.

In order to use HTMLParser you will need to be able to write code in the Java programming language. Although some example programs are provided that may be useful as they stand, its more than likely you will need (or want) to create your own programs or modify the ones provided to match your intended application.

To use the library, you will need to add either the htmllexer.jar or htmlparser.jar to your classpath when compiling and running. The htmllexer.jar provides low level access to generic string, remark and tag nodes on the page in linear, flat, sequential manner. The htmlparser.jar, which includes the classes found in htmllexer.jar, provides access to page as sequence of nested differentiated tags containing string, remark and other tag nodes. So where the output from calls to the lexer nextNode() method might be:

< html>

< head>

< title>

"Welcome"

< /title>

< /head>

< body>

etc...

The output from the parser NodeIterator would nest the tags as children of the and other nodes (here represented by indentation):

< html>

< head>

< title>

"Welcome"

< /title>

< /head>

< body>

etc...

The parser attempts to balance opening tags with ending tags to present the structure of the page, while the lexer simply spits out nodes. If your application requires only modest structural knowledge of the page, and is primarily concerned with individual, isolated nodes, you should consider using the lightweight lexer. But if your application requires knowledge of the nested structure of the page, for example processing tables, you will probably want to use the full parser.

Extraction

Extraction encompasses all the information retrieval programs that are not meant to preserve the source page. This covers uses like:

  • text extraction, for use as input for text search engine databases for example
  • link extraction, for crawling through web pages or harvesting email addresses
  • screen scraping, for programmatic data input from web pages
  • resource extraction, collecting images or sound
  • browser front end, the preliminary stage of page display
  • link checking, ensuring links are valid
  • site monitoring, checking for page differences beyond simplistic diffs
  • There are several facilities in the HTMLParser codebase to help with extraction, including filters, visitors and JavaBeans.

    Transformation

    Transformation includes all processing where the input and the output are HTML pages. Some examples are:

  • URL rewriting, modifying some or all links on page
  • site capture, moving content from the web to local disk
  • censorship, removing offending words and phrases from pages
  • HTML cleanup, correcting erroneous pages
  • ad removal, excising URLs referencing advertising
  • conversion to XML, moving existing web pages to XML
  • During or after reading in page, operations on the nodes can accomplish many transformation tasks "in place", which can then be output with the toHtml() method. Depending on the purpose of your application, you will probably want to look into node decorators, visitors, or custom tags in conjunction with the PrototypicalNodeFactory.

    The HTML Parser is an open source library released under GNU Lesser General Public License, which basically says you are free to use the library "as is" in other (even proprietary) products, as long as due credit is given to the authors and the source code for the HTMLParser is included or available with the other product. For modified or embedded use, please consult the LGPL license.

     

    Details

    Publisher: Derrick Oswald
    Title: HTML Parser 1.6-20060610
    Platform: n/a
    License: LGPL (GNU Lesser General Public License)
    Price: empty
    Size: 4.2 MB
    Downloads: 10103
    Added: 2006-06-11

    Download: HTML Parser 1.6-20060610


    Download now

    Related software


    HTML Parser 1.6-20060610

    HTMLParser is super-fast real-time parser for real-world HTML. What has attracted most developers to HTMLParser has been its simplicity in design, speed and ability to handle streaming real-world html

      Post date: 2006-06-15
    Size: 4.2 MB
    Downloads: 10103

    MIB Smithy SDK 3.4

    MIB Smithy SDK project is dynamic Tcl/Tk extension for developing your own SNMP management scripts and SMI conversion tools (with or without GUI).

      Post date: 2006-02-08
    Size: 2.3 MB
    Downloads: 10032

    HTMLatex 1.3

    HTMLatex is mod_python application that uses memcached to reduce the massive overhead of repeatedly rendering the same equation.

      Post date: 2006-04-21
    Size: 0.038 MB
    Downloads: 10006

    xfpt 0.00

    xfpt is program that reads file of plain text that contains relatively simple markup, and outputs an XML file. xfpt project is intended to simplify the management of XML data.

      Post date: 2006-01-09
    Size: 0.12 MB
    Downloads: 9958

    OmegaT+ 1.4.6

    OmegaT+ is computer assisted translation (CAT) tool suite. The project currently includes: omegat, translation editor with translation memory; bitext2tmx, bitext aligner/converter into TMX; TMXValidat

      Post date: 2007-05-30
    Size: 0.47 MB
    Downloads: 9904

    ESP 1.74

    An ethics-enabled search engine can act as complement to the well-known price search engines (a topic have been working on earlier) and turn ethical considerations into an easily advertisable.

      Post date: 2005-08-01
    Size: 0.013 MB
    Downloads: 9903

    upCast 5.4.1

    upCast enables you to use Microsoft Word as an authoring application for XML documents.

      Post date: 2005-12-12
    Size: 8.5 MB
    Downloads: 9875

    SiSU 0.57.0

    SiSU is Serialized information, Structured Units for Electronic Documents, is document creation and management framework.

      Post date: 2007-08-21
    Size: 1.2 MB
    Downloads: 9867

    generateDS.py 1.10a

    generateDS.py generates Python data structures (for example, class definitions) from an XML Schema document.

      Post date: 2007-05-23
    Size: 0.11 MB
    Downloads: 9862

    XML From Plain Text 0.03

    XML From Plain Text (xfpt) is program that reads file of plain text that contains relatively simple markup, and outputs an XML file. It is intended to simplify the management of XML data.

      Post date: 2007-07-01
    Size: 0.13 MB
    Downloads: 9859



    Home | Windows | Drivers | Scripts | Mobile | Mac | Linux

    Copyright © 2008, Software-Drivers.com