You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Aspose.HTML for Java](https://products.aspose.com/html/java) is a Java component built to allow developers to programmatically create and manipulate [HTML](https://wiki.fileformat.com/web/html/) documents, whether simple or complex and on the fly. Aspose.HTML for Java allows developers to Insert, Remove, Replace HTML nodes, extract CSS style information, Navigate through HTML document either by NodeIterator, TreeWalker that are provided by Traversal Specifications, XPath or CSS selector queries. It also offers the scripting which allows to manipulate HTML DOM via JavaScript. As well as HTML, this API also provides the capabilities to load EPUB and MHTML.
1
+
# HTML File Manipulation Java API
3
2
4
-
This repository contains [Examples](Examples) for [Aspose.HTML for Java](https://products.aspose.com/html/java) to help you learn and write your own applications.
3
+
The [Java HTML API](https://products.aspose.com/html/java) assists developers to write, read, modify, navigate and convert (X)HTML documents from within Java applications.
4
+
5
+
Aspose.HTML for Java API works as a headless browser that allows you to [create or open existing HTML documents](https://docs.aspose.com/display/htmljava/Loading+an+existing+HTML+document) 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.
6
+
7
+
The classes and properties of Aspose.HTML for Java API have similar names as that of W3C HTML specification.
8
+
9
+
Directory | Description
10
+
--------- | -----------
11
+
[Examples](https://github.com/aspose-html/Aspose.HTML-for-Java/tree/master/Examples) | A collection of Java examples that help you learn the product features.
5
12
6
13
<palign="center">
7
14
@@ -10,27 +17,79 @@ This repository contains [Examples](Examples) for [Aspose.HTML for Java](https:/
10
17
</a>
11
18
</p>
12
19
13
-
Directory | Description
14
-
--------- | -----------
15
-
[Examples](Examples) | A collection of Java examples that help you learn and explore the API features
20
+
## HTML Processing API Features
21
+
22
+
### General Features
23
+
24
+
- Written completely in Java and works with JRE.
25
+
- Supports both the `32-bit` & `64-bit` OS support.
26
+
- Create or open an existing HTML document from different sources.
27
+
- Ability to manipulate (create, edit, remove, replace) HTML nodes via API.
28
+
- Extract CSS styles for specific HTML node.
29
+
- Configure a document sandbox that affects the processing of HTML documents.
30
+
- Supports navigation through HTML document in various ways (Element Traversal, Document Traversal, XPath queries, CSS Selector queries).
31
+
- Manipulate HTML DOM via JavaScript.
32
+
- Convert web documents to various supported file formats.
33
+
34
+
### Text Related Features
35
+
36
+
- Extract text from pages.
37
+
- Search text from pages.
38
+
- Add text in HTML file.
39
+
40
+
### Document Related Features
41
+
42
+
- Create, edit, remove and replace HTML nodes
43
+
- Extracting CSS styles for particular HTML node
44
+
- Convert HTML documents into various supported image formats: JPEG, PNG, BMP, TIFF
45
+
- Convert HTML documents to PDF format
46
+
- Convert HTML documents to XPS format.
47
+
48
+
## Read & Write Web Formats
49
+
50
+
**Web:** HTML, XHTML^, MHTML^^\
51
+
**Other:** SVG*, MD**
52
+
53
+
- ^Save option is only available when the input file is `XHTML`.
54
+
- ^^Save option is only available when saving `MHTML` document.
55
+
-*Save option is only available when the input file is `SVG`.
56
+
-**Save option is only available when saving `HTML` document.
57
+
58
+
## Save HTML As
59
+
60
+
**Fixed Layout:** PDF, XPS\
61
+
**Images:** TIFF, JPEG, PNG, BMP
62
+
63
+
## Read Formats
64
+
65
+
EPUB
66
+
67
+
## Supported Environments
68
+
69
+
-**Microsoft Windows:** Windows Desktop & Server (x86, x64)
70
+
-**macOS:** Mac OS X
71
+
-**Linux:** Ubuntu, OpenSUSE, CentOS, and others
72
+
-**Java Versions:**`J2SE 8.0 (1.8)` or above
16
73
17
-
## How to Run the Examples
74
+
## Get Started with Aspose.HTML for Java
18
75
19
-
+ You can either clone the repository using your favorite GitHub client or download the ZIP file from here.
20
-
+ Extract the contents of the ZIP file to any folder on your computer. All the examples are located in the Examples folder.
21
-
+ You can run/execute these examples with any IDE of your choice.
22
-
+ Open the project in your selected IDE.
23
-
+ Open the example file that you want to run.
24
-
+ Run the file in your IDE (method may vary depending on the IDE you use).
25
-
+ The resources folder in the Examples/src folder contains input files used in the examples. It is mandatory that you download this folder along with the examples project.
76
+
Aspose hosts all Java APIs at the [Aspose Repository](https://repository.aspose.com/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-html). 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](https://docs.aspose.com/display/htmljava/Installation#Installation-InstallingAspose.HTMLforJavafromAsposeRepository) documentation page.
26
77
27
-
Please find more details on how to run the examples [here](https://docs.aspose.com/display/htmljava/How+to+Run+the+Examples).
78
+
## Load HTML File from a remote URL / Server using Java
28
79
29
-
## Resources
80
+
```java
81
+
// For complete examples and data files, please go to https://github.com/aspose-html/Aspose.Html-for-Java
82
+
// The path to the documents directory.
83
+
String dataDir =Utils.getDataDir();
84
+
// This simple test shows how to load document from remote server
0 commit comments