PRODUCT_NAME_ALT

Convert XHTML TO HTML on JAVA

How to convert XHTML file to HTML by Aspose.HTML Cloud JAVA SDKs.

Aspose.HTML Cloud is a REST API for manipulating and converting HTML documents. Our REST API provides the following capabilities:

  • Converting a source document into PDF or XPS format. The source document can be an HTML document from the cloud storage (also XHTML, MHTML, EPUB, Markdown), or a Web page by its URL.
  • Converting a source document into one of the image formats: JPEG, PNG, TIFF, BMP, GIF.
  • Converting a Markdown file into HTML.
  • Convert MHTML to HTML.

XHTML TO HTML Conversion in Cloud Apps

  • Create an account at Dashboard to get free API quota & authorization details
  • Initialize HTMLApi with Client Id, Client Secret, Base URL & API version
  • Initialize ConverterBuilder with XHTML file, HTML ConversionOptions instance and destination folder
  • Call XHTMLAPI.Convert method to convert the file to HTML

Get Started with HTML REST API

Get Aspose.HTML Cloud SDK for JAVA source code from GitHub to compile the SDK yourself or head to the Releases for alternative download options.

Also have a look at Swagger-based API Reference to know more about the JAVA REST API.

Get Images from HTML Document

The Aspose.HTML Cloud SDK is capable of Fetching the HTML page along with its resources as a ZIP archive from the page URL.

To retrieve all images of an HTML page as a ZIP package based on Page URL we need to do the following.

  • Create DocumentAPI object
  • Call GetDocumentImages method of DocumentAPI class instance

XHTML File Information Extraction

The file information extraction feature not only allows getting the basic information about the XHTML file but it also supports extracting some valuable file-format specific information such as project start and end dates of a Microsoft Project file, any printing restrictions on a PDF document, list of folders enclosed in an Outlook data file etc.

Convert popular document file formats on different operating systems such as Windows, Linux or macOS while using platforms such as Windows Azure, Mono and Xamarin.

HTML to Image conversion

Aspose.HTML Cloud SDK for .NET produces a few quick and easy ways to convert HTML files to various image formats: by direct REST API calls or using SDKs. There are multiple image formats accessible for converting HTML documents with Aspose.HTML Cloud APIs - JPEG, PNG, BMP, GIF, and TIFF.

  • Create HTMLConversionOptions object to convert XHTML document
  • Create new instance of ConverterBuilder class
  • Call Convert method of HTMLApi class instance for conversion to XHTML

Load & Convert Remotely Located XHTML Files

Using Aspose.HTML for JAVA – developers can load and convert documents from various remote locations and cloud document storage resources such as Amazon S3, Microsoft Azure Blob, FTP, local disk, stream or a simple URL. You just have to specify the method to obtain remotely located document stream and then pass it on to the Converter class as a constructor.

Aspose.HTML Cloud RESTful APIs to Create, Edit & Convert over 100 File Formats from any Language, on any Platform

FAQ

How can I get started with Aspose.HTML REST APIs?
Quickstart not only guides through the initialization of Aspose.HTML Cloud API, it also helps in installing the required libraries.
Where can I see the release notes for Aspose.HTML Cloud API?
Complete release notes can be reviewed at Aspose.HTML Cloud Documentation.
Is it safe to convert XHTML TO HTML in the Cloud?
Of course! Aspose Cloud uses Amazon EC2 cloud servers that guarantee the security and resilience of the service. Please read more about Aspose’s Security Practices.
What file formats are supported by Aspose.HTML Cloud API?
Aspose.HTML Cloud can convert HTML to PDF, DOCX, XPS, image(TIFF, JPEG, PNG BMP), MD and more. Checkout the complete list of supported file formats.
I can not find the SDK for my favorite language. What should I do?
Aspose.HTML Cloud is also available as a Docker Container. Try using it with cURL in case your required SDK is not available yet.
I do not have time to set up. Is there a quick demo for XHTML TO HTML that I can try?
Indeed! Checkout the XHTML TO HTML Conversion App.