Hi,
ich arbeite gerade das Buch "xml - extensible markup language von anfang
an" durch und bekomme bei einem Beispiel nicht das angezeigt wie es sein
sollte (siehe screenshot 1). Wie man auf dme Screenshot sehen kann ist
die tabelle leer , es sollten eigentlich die Daten aus der xml Datei
bspl017.xml herausgefiltert werden. mir ist beim quellcode aufgefallen
das in bspl018.htm das Tag <adressen> gar nicht verwendet wird
vielleicht liegt darin der Fehler? bin noch anfänger bei xml hoffe jemand kann mir weiterhelfen.
PS: ich habe zum anzeigen internet explorer 8 und firefox 3.6.13 benutzt
aber beides mal das gleiche ergebnis
hier der code zu Bspl017.xml:
Code zu Bspl018.htm:
ich arbeite gerade das Buch "xml - extensible markup language von anfang
an" durch und bekomme bei einem Beispiel nicht das angezeigt wie es sein
sollte (siehe screenshot 1). Wie man auf dme Screenshot sehen kann ist
die tabelle leer , es sollten eigentlich die Daten aus der xml Datei
bspl017.xml herausgefiltert werden. mir ist beim quellcode aufgefallen
das in bspl018.htm das Tag <adressen> gar nicht verwendet wird
vielleicht liegt darin der Fehler? bin noch anfänger bei xml hoffe jemand kann mir weiterhelfen.
PS: ich habe zum anzeigen internet explorer 8 und firefox 3.6.13 benutzt
aber beides mal das gleiche ergebnis
hier der code zu Bspl017.xml:
Code:
<?xml version="1.0" encoding="utf-8" ?> <!-- Bspl017.xlm --> <adressen> <eintrag> <bereich>Einkauf</bereich> <name>Maria Meier</name> <mail>[email protected]</mail> </eintrag> <eintrag> <bereich>Einkauf</bereich> <name>Paul Peters</name> <mail>[email protected]</mail> </eintrag> <eintrag> <bereich>Verkauf</bereich> <name>Hans Schmitz</name> <mail>[email protected]</mail> </eintrag> <eintrag> <bereich>Verkauf</bereich> <name>Willi Schmidt</name> <mail>[email protected]</mail> </eintrag> <eintrag> <bereich>Verkauf</bereich> <name>Karl Kaiser</name> <mail>[email protected]</mail> </eintrag> <eintrag> <bereich>Technik</bereich> <name>Otto Muster</name> <mail>[email protected]</mail> </eintrag> </adressen>
Code:
<!-- Bspl18.htm --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Externe Dateninsel</title> </head> <body> <h1>E-Mail-Adressen</h1> <P>Für Fragen wenden Sie sich bitte an unsere Mitarbeiter:</P> <hr> <xml id="mailliste" src="Bspl017.xml"></xml> <table border="1" datasrc="#mailliste" cellPadding="5"> <thead> <tr> <th>Abteilung</th> <th>Name</th> <th>E-Mail-Adresse</th> </tr> </thead> <tr> <td><span datafld="bereich"></span></td> <td><span datafld="name"></span></td> <td><span datafld="mail"></span></td> </tr> </table> <hr> </body> </html>
Comment