Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Beliebige HTML Tags in Strings entfernen

Empfohlene Antworten

  • 2 Wochen später...

du kannst dir dafür eigentlich auch selbst eine Methode schreiben.

die Methoden könnte mithilfe von verschiedenen String Methoden nach ">" und "<" suchen und die "" setzten(und den Text dazwischen auch).

Ist halt ein bisschen auffwändig wäre aber ne Stilvolle Möglichkeit.

Hi,

versuchs vielleicht mal so:


import java.io.*;

import java.net.*;


import javax.swing.text.html.*;


public class Main {


    public static void main(String[] args) {


        try {

            URL url = new URL("http://www.amazon.com/");


            HTMLEditorKit editKit = new HTMLEditorKit();

            HTMLDocument doc = new HTMLDocument();

            Reader re = new InputStreamReader(url.openStream());

            editKit.read(re, doc, 0);


            System.out.println(doc.getText(0, doc.getLength()));

        } catch (Exception e) {


            e.printStackTrace();

        }


    }

}

Gruß Jaraz

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.