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

  • SEARCH
  • Home
  • 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 5991539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:24:06+00:00 2026-05-22T23:24:06+00:00

Could please anybody recommend libraries that are able to do the opposite thing than

  • 0

Could please anybody recommend libraries that are able to do the opposite thing than these libraries ?

HtmlCleaner, TagSoup, HtmlParser, HtmlUnit, jSoup, jTidy, nekoHtml, WebHarvest or Jericho.

I need to build html pages, build the DOM model from String content.

EDIT: I need it for testing purposes. I have various types of input/strings that might be in the html page on various places… So I need to dynamically build it up… I then process the html page based on various criterions that must be fulfilled or not.

I will show you why I asked this question, consider htmlCleaner for this job :

List<String> paragraphs = getParagraphs(entity.getFile());
List<TagNode> pNodes = new ArrayList<TagNode>();

TagNode html = cleaner.clean("<html/>");
for(String paragraph : paragraphs) {                
    TagNode p = new TagNode("p");
    pNodes.add(p);
    // CANNOT setText() ?
}
html.addChildren(pNodes);

The problem is that TagNode has getText() method, but no setText() method ….

Please add more comments about how vague this question is … The best thing you can do

  • 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-05-22T23:24:07+00:00Added an answer on May 22, 2026 at 11:24 pm

    If you are interested in HtmlCleaner particularly, it is actually a very convenient choice for building html documents.

    But you must know that if you want to set content to a TagNode, you append a child ContentNode element 🙂

    List<String> paragraphs = getParagraphs(entity.getFile());
    List<TagNode> pNodes = new ArrayList<TagNode>();
    
    TagNode html = new TagNode("html");
    for(String paragraph : paragraphs) {                
        TagNode p = new TagNode("p");
        p.addChild(new ContentNode(paragraph));
        pNodes.add(p);
    }
    html.addChildren(pNodes);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anybody please help me to write rewriterule, that redirects http<->https (back and force
Can anybody please explain how this could possibly happen? I am completely aware of
could please anybody tell me what is wrong with this regexp ? ((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\\:([0-9]{2,5}) for
Could anybody please tell me why i am getting java.text.ParseException: Unparseable date in the
could please anybody help me to install spring surf ? According to this video
Hey, I'm talking about profiles within pom.xml of a project. Could please anybody explain
Could anybody please tell me which is best guide/book/material for socket programming in C?
I am new to a lot of these C++ libraries, so please forgive me
Could please anybody help me to sort it out? It can be done like
Could please anybody suggest a way to deal with Inheritance regarding Page Objects pattern

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.