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.

XML Inhalt als String ausgeben

Empfohlene Antworten

Veröffentlicht

Servus

Ich bräuchte kurz eure Hilfe.

Und zwar möchte ich ein XML-File, dass ich lokal bei mir gespeichert habe, auslesen.

Aber nicht nur einzelne Elemente sondern mit der kompletten Struktur.

Weiß jemand vielleicht wie ich das am besten realisiere?

Gruß

Johnny

Ich weiß nicht, ob ich dich richtig verstanden habe: Du willst einfach nur den XML-Code so wie er in der Datei steht ausgeben?


BufferedReader in = new BufferedReader(new FileReader("[Pfad zur XML-Datei]"));


String alles ="";

String s;

while((s = in.readLine()) != null){

      alles.concat(s.concat("\n"));

}


System.out.println(alles);

________________________

sry für das Daumen-runter-Icon (ist reingerutscht und jetzt gehts nimmer raus).

danke für die schnelle antwort.

bin unmittelbar nach dem erstellen selbst drauf gekommen...

wenn man zu kompliziert denkt fallen einem die leichtesten sachen nicht mehr ein.

Gruß

Johnny

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.