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-Encoding declaration PROBLEM

Empfohlene Antworten

Hey meine lieben,

vllt könnt ihr mir ja irgendwie helfen.

ich finde www-weit anscheinend niemanden der mir da helfen kann...

Ich will ein bisschen den Umgang mit XML und XSD's probieren,

aber mein DOMParser-Programm

(welches ohne xsd einfach nur problemlos parst und ausgibt)

gibt mir immer folgenden Fehler:


[Fatal Error] Fahrzeuge.xml:2:45: The encoding declaration is required in the text declaration.

org.xml.sax.SAXParseException: The encoding declaration is required in the text declaration.

	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)

	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)

	at DomEcho.main(DomEcho.java:82)

ich würde das verstehen wenn ich kein encoding tag in der xml hätte, aber schaut selbst: meine xml:

<?xml version="1.0" encoding="UTF-8"

xmlns:xsi="http://www.w3.org/2001/XMLSchema" 

xsi:noNamespaceSchemaLocation = "meinXSD.xsd"?>

<garage>

	<fahrzeug>

		<id>1</id>

		<art>Kleinwagen</art>

		<farbe>Braun</farbe>

		<Mietpreis>18</Mietpreis>

		<details>

			<kmstand>32000</kmstand>

			<ladenpreis>18000</ladenpreis>

		</details>

	</fahrzeug>


	<fahrzeug>

		<id>2</id>

		<farbe>Grün</farbe>

		<mietpreis>22</mietpreis>

	</fahrzeug>


	<fahrzeug>

		<id>3</id>

		<art>Bus</art>

		<farbe>Schwarz</farbe>

		<mietpreis>22</mietpreis>

	</fahrzeug>

</garage>

also eigentlich alles da, wenn ich und meine kollegen sich nicht irren. xsd header sieht so aus:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">


	<xsd:element name = "garage" type = "garagenTyp"/>

bitte postet wenn ihr auch nur irgendeine ahnung habt.

Ich danke schonmal! Ihr seid bestimmt die besten. ;-)

Liebe Grüße,

Flo

Hey perdian,

du bist mein persönlicher Wochen-Held! ;-)

Ich danke dir....irgenwdie war das zuviel neuer kram um so eine lapalie auszuprobieren ;-)

Ich schaffe es heute noch nicht das auszuprobieren, aber ich geb mein bestes mich noch zu melden obs geklappt hat.

Nochmal danke ;-)

Bis zum nächsten mal!

:hells:

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.