Skip to content

Commit 0df02bc

Browse files
authored
Updated as per the Standard Template.
1 parent f1f059b commit 0df02bc

File tree

1 file changed

+81
-22
lines changed

1 file changed

+81
-22
lines changed

README.md

Lines changed: 81 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
## Aspose.HTML for Java
2-
[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
32

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.
512

613
<p align="center">
714

@@ -10,27 +17,79 @@ This repository contains [Examples](Examples) for [Aspose.HTML for Java](https:/
1017
</a>
1118
</p>
1219

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
1673

17-
## How to Run the Examples
74+
## Get Started with Aspose.HTML for Java
1875

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.
2677

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
2879

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
85+
com.aspose.html.HTMLDocument document = new com.aspose.html.HTMLDocument(new com.aspose.html.Url(dataDir + "input.html"));
86+
// Read children nodes and get length information
87+
if (document.getBody().getChildNodes().getLength() == 0)
88+
System.out.println("No ChildNodes found...");
89+
// Print Document URI to console. As per information above, it has to be https://www.w3.org/TR/html5/
90+
System.out.println("Print Document URI = " + document.getDocumentURI());
91+
// Print domain name for remote HTML
92+
System.out.println("Domain Name = " + document.getDomain());
93+
```
3094

31-
+ **Website:** [www.aspose.com](https://www.aspose.com)
32-
+ **Product Home:** [Aspose.HTML for Java](https://products.aspose.com/html/java)
33-
+ **Download:** [Download Aspose.HTML for Java](https://repository.aspose.com/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-html)
34-
+ **Documentation:** [Aspose.HTML for Java Documentation](https://docs.aspose.com/display/htmljava/Home)
35-
+ **Free Support Forum:** [Aspose.HTML for Java Free Support Forum](https://forum.aspose.com/c/html)
36-
+ **Blog:** [Aspose.HTML for Java Blog](https://blog.aspose.com/category/aspose-products/aspose-html-product-family/)
95+
[Product Page](https://products.aspose.com/html/java) | [Docs](https://docs.aspose.com/display/htmljava/Home) | [Demos](https://products.aspose.app/html/family) | [API Reference](https://apireference.aspose.com/java/html) | [Examples](https://github.com/aspose-html/Aspose.Html-for-Java) | [Blog](https://blog.aspose.com/category/html/) | [Free Support](https://forum.aspose.com/c/html) | [Temporary License](https://purchase.aspose.com/temporary-license)

0 commit comments

Comments
 (0)