Skip to content

aspose-html/Aspose.HTML-for-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HTML File Manipulation Java API

The Java HTML API assists developers to write, read, modify, navigate and convert (X)HTML documents from within Java applications.

Aspose.HTML for Java API works as a headless browser that allows you to create or open existing HTML documents from various sources in order to perform manipulation operations such as remove and replace HTML nodes, save HTML documents, extract CSS from HTML, configure a document sandbox and more. You may navigate HTML documents by using various methods, such as, element traversal, document traversal, XPath queries, and CSS selector queries as well as manipulate HTML DOM via JavaScript, convert HTML file to images or fixed layout formats, and convert XHTML and EPUB files to other file formats.

Directory Description
Examples A collection of Java examples that help you learn the product features.

HTML Processing Features

  • Written completely in Java and works with JRE.
  • Supports both the 32-bit & 64-bit OS support.
  • Create or open an existing HTML document from different sources.
  • Ability to manipulate (create, edit, remove, replace) HTML nodes via API.
  • Extract CSS styles for specific HTML node.
  • Configure a document sandbox that affects the processing of HTML documents.
  • Supports navigation through HTML document in various ways (Element Traversal, Document Traversal, XPath queries, CSS Selector queries).
  • Manipulate HTML DOM via JavaScript.
  • Convert web documents to various supported file formats.
  • Extract text from pages.
  • Search text from pages.
  • Add text in HTML file.
  • Create, edit, remove and replace HTML nodes
  • Extracting CSS styles for particular HTML node
  • Convert HTML documents into various supported image formats: JPEG, PNG, BMP, TIFF
  • Convert HTML documents to PDF format
  • Convert HTML documents to XPS format.

Read & Write Web Formats

Web: HTML, XHTML^, MHTML^^
Other: SVG*, MD**

Save HTML As

Fixed Layout: PDF, XPS
Images: TIFF, JPEG, PNG, BMP

Read Formats

Images: EPUB

Supported Environments

  • Microsoft Windows: Windows Desktop & Server (x86, x64)
  • macOS: Mac OS X
  • Linux: Ubuntu, OpenSUSE, CentOS, and others
  • Java Versions: J2SE 8.0 (1.8) or above

Get Started with Aspose.HTML for Java

Aspose hosts all Java APIs at the Aspose Repository. You can easily use Aspose.HTML for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.HTML for Java from Aspose Repository documentation page.

Load HTML from a Remote Location

HTMLDocument document = HTMLDocument(new Url("template.html"));
// read children nodes and get length information
if (document.getBody().getChildNodes().getLength() == 0)
    System.out.println("No ChildNodes found...");
// print Document URI to console. As per information above, it has to be https://www.w3.org/TR/html5/
System.out.println("Print Document URI = " + document.getDocumentURI());
// print domain name for remote HTML
System.out.println("Domain Name = " + document.getDomain());

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Temporary License

Releases

No releases published

Packages

No packages published

Contributors 16