Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8948747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:04:36+00:00 2026-06-15T13:04:36+00:00

Are there any Java APIs (or web services) to beautify/format/pretty-print the html, xml and

  • 0

Are there any Java APIs (or web services) to beautify/format/pretty-print the html, xml and .java source code files?

So basically, I m indexing these various types of files in Apache Solr server and then fetching it when user searches for it. I m using Solr Cell for this. (Its like a grepcode application.)

The problem here is the file content comes as a plain text w/o any formatting (as the Solr field type is ‘text’ in the schema).

I m looking for any APIs (in Java) or web services so that I can hook it up in my application and convert the text (String in Java) to well formatted output to show on a web page.

Appreciate the pointers.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:04:37+00:00Added an answer on June 15, 2026 at 1:04 pm

    I got the solution html and tag is doing the trick.
    All I wanted was to preserve the whitespaces while displaying the content (string).

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any APIs available in Java to query jobs? In other words, I
Is there any Java lib that allows me to download web pages recursively given
Are there any Java APIs to find out the JDK version a class file
Without having the source code for a Java API, is there anyway to know
The following algorithm is used with Google Maps: http://code.google.com/intl/ru-RU/apis/maps/documentation/utilities/polylinealgorithm.html Are there any alternatives? The
Are there any native APIs (C code) in Ice Cream Sandwich that I can
Is there any plan to leverage java 7 util.concurrent's ForkJoin APIs or, expose similar
Is there any java utility to convert string to hex value (integer) ?
Is there any Java function or util class which does rounding this way: func(3/2)
Is there any Java profiler that allows profiling short-lived applications? The profilers I found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.