HTML javascript normalizer

Is there a library that can convert any given HTML page with JS, CSS throughout the text, into a minimalist single format?

For example, if we create a stackoverflow homepage, I want it to display in a minimal format. I want all other sites to be deleted.

It looks like a Lynx web browser, but with minimal graphics.

+3
source share
2 answers

To answer your first question: No. I do not think there is a library for this purpose. (At least this is what led my "googeling").

And I think the reason for this is because you need a very big need.

, html , , JEditorpane , .

, ( , xml ).

  • xslt, html, , .

  • html. ( , (2006)), .

, . , , .

+1

Lynx, , - Jericho Renderer.

:

    Source source=new Source(new URL(sourceUrlString)); // or new Source("<html>pass in raw html string</html>");
    String renderedText=source.getRenderer().toString();
    System.out.println("\nSimple rendering of the HTML document:\n");
    System.out.println(renderedText);

( )

HTML ( ).

, :

Exchange | | | | |

    *     *     *     *     *     *

Java HTML?

**

, HTML- JS, CSS all , ?

, stackoverflow, , . .

- Lynx, .

java lynx link | edit | flag 2 Kim Jong Woo 593112 89% rate HTML- HTML " " ? ? - PAULO Ebermann html- . - Jong Woo 16

2

: . , . ( , , "googeling" ).

, , .

, html JEditorpane , .

, ( , xml ).

* 

  Use a library to ensure that your html conforms to xhtml:

http://htmlcleaner.sourceforge.net/release.php

* 

  then either parse the xml with DOM or SAX parsers and display it the

.

* use xslt to transform the document into some other html document

, .

* use one of the available html parser librarys. (The most of which i

, (2006)) .

, . , , .

+1

Source: https://habr.com/ru/post/1795160/


All Articles