Improved Document Traversal and Network Layer in Aspose.HTML for Java

We at Aspose are honored to announce the November release of Aspose.HTML for Java, which is available on maven repository for download. As per regular monthly update process, we have made improvements as well as introduced new features in the API. Furthermore, we have also made some internal bug fixes, in order to provide better performance. An overview of public API changes and improvements is given in the release notes of the Aspose.Html for Java 17.11.

HTML is composed of a tree of HTML nodes, such as text nodes and each node can have HTML attributes specified. In Aspose.HTML for Java 17.11, we have introduced ‘live’ and ‘static’ collections of HTML nodes according to HTML Traversal recommendations. HTMLCollection collection has been replaced with NodeList which provides ordered collection of nodes. In order to get node list by specifying selector, you can use com.aspose.html.dom.Document.QuerySelectorAll(String selector) or com.aspose.html.dom.Element.QuerySelectorAll(String selector) method(s).

com.aspose.html.HTMLDocument document = 
new com.aspose.html.HTMLDocument(dataDir + "example.html");

com.aspose.html.collections.NodeList nodelist = 
document.getDocumentElement().querySelectorAll("img");

In Aspose.HTML for Java 17.11, the transport layer of library has been improved and it allows to read the document encoding from web requests/response. Along with that an enumeration “PdfPermissions” has been introduced, which is used for configuring com.aspose.html.rendering.pdf.Encryption() method.

Miscellaneous Resources

Please visit the following links for information regarding Aspose.HTML for Java 17.11 and Release Notes section.