Generated by GPT-5-mini| NekoHTML | |
|---|---|
| Name | NekoHTML |
| Developer | nekohtml project contributors |
| Released | 2001 |
| Latest release version | 1.9.22 |
| Programming language | Java |
| Operating system | Cross-platform |
| Genre | XML/HTML parser |
| License | LGPL |
NekoHTML is a Java-based HTML scanner and tag balancer that converts HTML into well-formed XML for processing by XML tools. It serves as a bridge between legacy HTML authored for browsers and XML ecosystems used by projects such as Apache Software Foundation, Eclipse Foundation, World Wide Web Consortium, Oracle Corporation, and IBM. Implementations of NekoHTML are often embedded in tooling alongside libraries like Apache Xerces, Apache Xalan, SAX, DOM, and JUnit to enable server-side or offline transformations of HTML into standards-oriented representations.
NekoHTML provides an HTML parser that emits a normalized XML document model compatible with the Document Object Model implementations found in Apache Xerces and Oracle Java SE. It is designed to cooperate with XML toolchains including SAX parsers, DOM manipulators, JAXP, XSLT engines like Apache Xalan, and testing frameworks such as JUnit and TestNG. By balancing tags and repairing common authoring mistakes, NekoHTML enables integration with systems that expect well-formed markup, such as Tomcat, Jetty, GlassFish, Spring Framework, and content-management platforms.
Development of NekoHTML began in the early 2000s with contributions from independent developers and maintainers influenced by browser parsing behavior from vendors like Microsoft, Netscape Communications Corporation, and Mozilla Foundation. Over time maintenance and distribution aligned with open source communities represented by projects at the Apache Software Foundation and package ecosystems used by Maven Central, Eclipse Marketplace, and corporate adopters like Oracle Corporation and IBM. Releases iterated to address evolving HTML dialects, interoperability with XML processors such as Apache Xerces and SAX, and to respond to security advisories raised by researchers connected to organizations like OWASP and academic institutions.
NekoHTML is implemented in Java and exposes parser interfaces compatible with SAX and DOM APIs. Its core components include a tokenizer that recognizes HTML lexical constructs influenced by browser parsing rules from Mozilla Foundation and Apple Inc. engineers, a tag-balancing engine that repairs mismatched or omitted tags, and an output layer that constructs a DOM suitable for processors like Apache Xerces and JAXB. Features include support for character encoding detection similar to mechanisms promoted by the World Wide Web Consortium, handling of legacy constructs found in content authored for Microsoft Internet Explorer and Netscape Navigator, and configurable behavior via properties that integrate with JAXP factories, Spring Framework bean wiring, and OSGi service registries.
NekoHTML is commonly used in conjunction with Apache Xerces for DOM creation, Apache Xalan for XSLT transformations, and SAX-based streaming workflows for content extraction in applications such as Apache Tika, Solr, Elasticsearch, and Lucene. It integrates with Maven and Gradle build systems and is embedded in server-side projects running on Apache Tomcat, Jetty, and GlassFish. Developers combine NekoHTML with web testing tools like Selenium and HtmlUnit or content-analysis systems such as Apache Nutch and Heritrix for crawling and archiving. It is also used in enterprise data pipelines alongside Spring Boot, Hibernate, and Apache Camel connectors to normalize incoming HTML before persistence or transformation.
Performance characteristics vary with Java Virtual Machine implementations from Oracle Corporation's HotSpot, OpenJDK, and vendor-tuned runtimes by IBM and Azul Systems. NekoHTML prioritizes robustness and correctness over raw throughput; it excels in repairing malformed HTML for downstream XML processors like Apache Xerces and Apache Xalan at moderate volumes. Compliance is pragmatic: the parser aims to emulate forgiving parsing behaviors documented by the World Wide Web Consortium and browser vendors while producing well-formed XML for standards-based tooling such as JAXP and DOM Level 3. In benchmarking scenarios involving JUnit harnesses and CI systems like Jenkins and GitHub Actions, NekoHTML is often compared with alternatives such as jsoup or native browser engines wrapped via Selenium.
NekoHTML is distributed under the GNU Lesser General Public License (LGPL), permitting use in both open source and proprietary projects with specific conditions for linking and distribution. Artifacts are published to central repositories such as Maven Central and consumed by dependency managers like Maven and Gradle. Source code historically circulated through project-hosting platforms and archives that include contributions from independent developers, and commercial distributors sometimes include NekoHTML within larger products from vendors like Oracle Corporation, IBM, and other enterprise software providers.
NekoHTML has been adopted in academic research, enterprise content processing, web archiving projects like Internet Archive workflows, and search-engine indexing systems including Apache Solr and Elasticsearch pipelines. It is cited in tooling for digital humanities projects, data cleaning pipelines used by institutions such as Library of Congress initiatives, and by companies building crawlers and scrapers. Critics note that alternatives such as jsoup or browser-based engines may offer simpler APIs or more modern HTML5 support, while proponents value NekoHTML for its Java-native integration with DOM and SAX toolchains in legacy XML-centric environments.
Category:Java libraries Category:HTML parsers Category:Free software