Supported Features
The following table summarizes the features available in Aspose.HTML for Java API.
Aspose.HTML for Java Features
Aspose.HTML for Java is a powerful programming library designed to help developers work with HTML and other web formats without problems. This API provides a robust set of functions for creating, manipulating, navigating, and converting documents such as HTML, XHTML, SVG, EPUB, MHTML, and MD into various output formats. Built on W3C specifications, Aspose.HTML for Java ensures a developer-friendly experience with intuitive class and property names that are closely aligned with standards.
This API mimics the behavior of a headless browser and offers following features.
- Creating or opening an existing HTML document from different sources:
- File: Open an HTML file from your local machine.
- Stream: Read and load HTML content directly from a stream.
- URL: Load HTML documents from the web via URLs.
- From Scratch: Create an HTML document programmatically using the API.
- HTML Manipulation: creating, editing, removing and replacing HTML nodes via API.
- Saving HTML document.
- Extracting CSS styles for particular HTML node.
- Configuring a document sandbox that affects the processing of HTML documents i.e. CSS styles in some cases are dependent on screen size and we allow to configure environment independently of an execution machine.
- Navigation through HTML document in different ways:
- Element Traversal: Navigate the DOM tree element by element.
- Document Traversal: Traverse the entire document structure.
- XPath queries: Use XPath expressions to locate specific nodes.
- CSS Selector queries: Search for elements using CSS selectors.
- Scripting that allows to manipulate HTML DOM via JavaScript.
- Converting HTML document into various supported formats: PDF, XPS, DOCX, JPG, PNG, BMP, TIFF, GIF, MD, and MHTML.
- Converting XHTML and similar formats, such as EPUB and MHTML to PDF, XPS, DOCX, JPG, PNG, BMP, TIFF, and GIF formats.
Note:
- String representation of
CSS Color value is dependent of the context that can be either in a
Specified
orComputed
state. - In the
Computed
state CSS Color is represented as rgb() or rgba() function. - In the
Specified
state CSS Color is represented as original string specified by the author.
The URL object is based on Java Framework implementation according to w3c URL specification. The difference between Framework and w3c is an order of constructor parameters
General Features
- Written completely in Java and works with JRE.
- JDK environment required.
- API reference in HTML Help format.
- Supported JDK 1.6 or higher versions.
HTML and XHTML Support
Aspose.HTML for Java provides support for modern HTML and XHTML standards, enabling you to work confidently with the latest web technologies.
Namespaces structure in API
Text Features
Aspose.HTML for Java provides robust text-handling capabilities for HTML documents:
- You can easily extract text from specific pages of an HTML document, enabling seamless content retrieval.
- The API supports searching for specific text within the document, making it a powerful tool for locating and analyzing data.
- For content modification, you can programmatically add text directly to an HTML file, ensuring flexibility in document customization.
Document Features
Aspose.HTML for Java offers extensive tools for manipulating and converting HTML documents. You can create, edit, delete, and replace HTML nodes, giving you full control over the document structure. The API also lets you extract CSS styles associated with specific HTML nodes, allowing for detailed style analysis.
The library supports converting HTML to a wide range of formats, including:
- Image formats: JPEG, PNG, BMP, TIFF, and GIF.
- Fixed markup formats: PDF and XPS.
- Microsoft Word format: DOCX.
- Web formats: Markdown (MD) and MHTML.