mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 29.03.2024 07:40 Benutzername: Passwort: Auto-Login

Thema: XML-Parser testen... vom 17.03.2004


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Programmierung -> XML-Parser testen...
Seite: Zurück  1, 2, 3, 4  Weiter
Autor Nachricht
fyll
Threadersteller

Dabei seit: 20.09.2003
Ort: Augsburg
Alter: 39
Geschlecht: Männlich
Verfasst Do 25.03.2004 08:23
Titel

Antworten mit Zitat Zum Seitenanfang

ooooooder...
*gaaanzliebschau*
... könntest du die Datei nicht irgendwie dauerhaft auf deinem Server lassen...?
irgendwie statt test.php farewell.php oder soo... Lächel Grins *zwinker*

dann mit dem Layout....:
[code:1:8536f00b4d]
<? echo '<?xml version=1.0 encoding=UTF-8 ?>';?>
<html>
<head>
<title>Farewell-Albion.de  bull;  Die Gilde auf Logres/Albion</title>
<meta http-equiv=content-type content=text/html;CHARSET=iso-8859-1>
<meta name=Author content=Euer (Euer@Farewell-Albion.de)>
<style type=text/css>
a:link { color: #ffffff; text-decoration:none;}
a:visited { color: #ffffff; text-decoration:none;}
a:hover { color:#ffffd0; text-decoration:none;}
.norm {
font-size:12px;
color: #ffffff;
font-weight:normal;
font-family: Verdana;}
</style>
</head>

<body bgcolor=#000000 style=margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; background-image:url(http://www.farewell-albion.de/bilder/main_bg.jpg); background-repeat:no-repeat; background-attachment:fixed;>

<table border=0 cellspacing=3 cellpadding=5>
<tr>
<td class=norm><b><u>Name</u></b></td>
<!-- <td class=norm><b><u>Rasse</u></b></td> -->
<td class=norm><b><u>Klasse</u></b></td>
<td class=norm><b><u>Level</u></b></td>
<td class=norm><b><u>Rang</u></b></td>
<td class=norm><b><u>Reichspunkte</u></b></td>
</tr>

<?

$server_status = file_get_contents(http://camelot-europe.goa.com/herald/servers/Logres/guilds/1960.xml);
$server_status=str_replace('<?xml version=1.0 encoding=UTF-8 ?&
  View user's profile Private Nachricht senden
Account gelöscht


Ort: -
Alter: -
Verfasst Do 25.03.2004 09:34
Titel

Antworten mit Zitat Zum Seitenanfang

Versuche es erst einmal wieder mit

Zitat:
$server_status = join("", file("http://camelot-europe.goa.com/herald/servers/Logres/guilds/1960.xml"));


anstelle der betreffenden Zeile, wenns dann imme noch nicht funktioniert, kannst du ja linken: http://www.optimusprime.de/farewell Lächel
 
Anzeige
Anzeige
Account gelöscht


Ort: -
Alter: -
Verfasst Do 25.03.2004 09:41
Titel

Antworten mit Zitat Zum Seitenanfang

Ich werd wahnsinnig, wo sind denn nun wieder die Sonderzeichen???

//
okay, diese *"$%§!§"$E charset-angabe hätte es auch getan ... das sprichwörtliche brett vorm kopf. funktioniert jetzt. bitte nimm aber folgenden quellcode:

Code:
<html>
<head>
<title>Farewell-Albion.de  bull;  Die Gilde auf Logres/Albion</title>
<meta http-equiv=content-type content=text/html;CHARSET=utf-8>
<meta name=Author content=Euer (Euer@Farewell-Albion.de)>
<style type=text/css>
a:link { color: #ffffff; text-decoration:none;}
a:visited { color: #ffffff; text-decoration:none;}
a:hover { color:#ffffd0; text-decoration:none;}
 .norm   {
   font-size:12px;
   color: #ffffff;
   font-weight:normal;
   font-family: Verdana;}
</style>
</head>

<body bgcolor=#000000 style=margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; background-image:url(http://www.farewell-albion.de/bilder/main_bg.jpg); background-repeat:no-repeat; background-attachment:fixed;>

<table border=0 cellspacing=3 cellpadding=5>
 <tr>
  <td class=norm><b><u>Name</u></b></td>
  <!-- <td class=norm><b><u>Rasse</u></b></td> -->
  <td class=norm><b><u>Klasse</u></b></td>
  <td class=norm><b><u>Level</u></b></td>
  <td class=norm><b><u>Rang</u></b></td>
  <td class=norm><b><u>Reichspunkte</u></b></td>
 </tr>

<?

$server_status = join(, file(http://camelot-europe.goa.com/herald/servers/Logres/guilds/1960.xml));


$p = xml_parser_create();
xml_parse_into_struct($p,$server_status,$vals,$index);
xml_parser_free($p);


foreach ($vals AS $k => $v) {

   
   
   if ($v[tag]==CHARACTER  $v[type]==open) {
      $name=trim($v[attributes][NAME]);
      echo <tr>;
      echo  <td class=\norm\><b>$name</td>;
   }
   if ($v[tag]==RACE  $v[value]!=) {
       $race=trim($v[value]);
       // echo  <td class=\norm\>$race</td>;
   }
   if ($v[tag]==CLASS  $v[value]!=) {
       $class=trim($v[value]);
       echo  <td class=\norm\>$class</td>;
   }
   if ($v[tag]==LEVEL  $v[value]!=) {
       $level=trim($v[value]);
      echo  <td class=\norm\>$level</td>;
   }
   if ($v[tag]==GUILDRANK  $v[value]!=) {
       $guildrank=trim($v[value]);
       echo  <td class=\norm\>$guildrank</td>;
   }
   if ($v[tag]==TOTALRP  $v[value]!=) {
       $totalrp=trim($v[value]);
      echo  <td class=\norm\>$totalrp</td>;
      echo </tr>;
   }
   
 

}
   
?>
</table>
<script type=text/javascript src=http://www.farewell-albion.de/f_to_fs.js></script>
<script type=text/javascript src=http://www.farewell-albion.de/scroll.js></script>

</body>
</html>


Zuletzt bearbeitet von am Do 25.03.2004 09:44, insgesamt 1-mal bearbeitet
 
fyll
Threadersteller

Dabei seit: 20.09.2003
Ort: Augsburg
Alter: 39
Geschlecht: Männlich
Verfasst Do 25.03.2004 10:03
Titel

Antworten mit Zitat Zum Seitenanfang

*zwinker*
thx, hab ich ... ^^
... der lädt da irgendwie ewig... muss wohl an dem kostenlosen PHP-Webspace liegen... so ein Schrott...
aber bei dir gehts ja *bäh*
Ich werde linken *zwinker*

Nochmals vielen vielen Dank ^^
  View user's profile Private Nachricht senden
fyll
Threadersteller

Dabei seit: 20.09.2003
Ort: Augsburg
Alter: 39
Geschlecht: Männlich
Verfasst Do 25.03.2004 10:13
Titel

Antworten mit Zitat Zum Seitenanfang

sorry, dass ich schon wieder nerv, aber es scheint so, als ob der nicht meine externen JavaScripts fressen will... (permisson denied...)

könntest du noch schnell unten statt den beiden js's das da setzen...?
Code:

function getDocSize(w) {
    if(!w) w = window;
    var pos = {w:0,h:0};
    if (document.height) {
      pos.w = w.document.width;
      pos.h = w.document.height;
    }
    else if (document.body  typeof document.body.scrollHeight != 'undefined') {
      pos.w = w.document.body.scrollWidth;
      pos.h = w.document.body.scrollHeight;
    }
    document.write('<div style=position:absolute; left:0px; top:0px;><form action= name=hoeheform><input type=hidden name=hoeheinput value=' + pos.h + '></form></div>');
}
getDocSize();

document.write('<div style=position:absolute; left:470px; top:0px;>');
document.write('<img src=leer.gif border=0 width=0 height=70 id=line><img src=leer.gif border=0 width=0 height=70>');
document.write('<div onMouseOver=hoch(); onMouseOut=clearTimeout(scrollhoch); clearTimeout(scrollschnellhoch) onClick=clearTimeout(scrollhoch); hochschnell(); style=cursor:pointer;><span class=big>uarr;</span></div>');
document.write('<img src=leer.gif border=0 width=0 height=150>');
document.write('<div onMouseOver=runter(); onMouseOut=clearTimeout(scrollrunter); clearTimeout(scrollschnellrunter) onClick=clearTimeout(scrollrunter); runterschnell(); style=cursor:pointer;><span class=big>darr;</span></div>');
document.write('<img src=leer.gif border=0 width=0 height=45>');
document.write('</div>');

function hoch() {
  document.getElementById(line).height=document.getElementById(line).height-3;
  window.scrollBy(0,-3);
  if(document.getElementById(line).height!=70) {
   scrollschnellhoch = ''
   scrollhoch = window.setTimeout(hoch(),0);
  }
  if(document.getElementById(line).height<70) {
   document.getElementById(line).height='70';
  }
}

function runter() {
 if(document.body.scrollTop+361<document.hoeheform.hoeheinput.value) {
  document.getElementById(line).height=document.getElementById(line).height+3;
  window.scrollBy(0,3);
  scrollschnellrunter = ''
  scrollrunter = window.setTimeout(runter(),0);
 }
}

function hochschnell() {
  document.getElementById(line).height=document.getElementById(line).height-8;
  window.scrollBy(0,-8);
  if(document.getElementById(line).height!=70) {
   scrollhoch = ''
   scrollschnellhoch = window.setTimeout(hochschnell(),0);
  }
  if(document.getElementById(line).height<70) {
   document.getElementById(line).height='70';
  }
}

function runterschnell() {
 if(document.body.scrollTop+365<document.hoeheform.hoeheinput.value) {
  document.getElementById(line).height=document.getElementById(line).height+8;
  window.scrollBy(0,8);
  scrollrunter = ''
  scrollschnellrunter = window.setTimeout(runterschnell(),0);
 }
}

if((parent.document.URL.slice(parent.document.URL.lastIndexOf(.)+1))==php) {
  document.location.href=http://www.farewell-albion.de;
}
  View user's profile Private Nachricht senden
Account gelöscht


Ort: -
Alter: -
Verfasst Do 25.03.2004 10:19
Titel

Antworten mit Zitat Zum Seitenanfang

na wenn DAS funktioniert.... *zwinker*
 
fyll
Threadersteller

Dabei seit: 20.09.2003
Ort: Augsburg
Alter: 39
Geschlecht: Männlich
Verfasst Do 25.03.2004 10:31
Titel

Antworten mit Zitat Zum Seitenanfang

*hust*
nö irgendwie nicht....
der mag mein JavaScript nicht, das die Dokumentgröße festlegt und man dann scollen kann...
*überleg*
... PHP wird doch wohl nicht erst ausgeführt, nachedm alle HTML Daten geladen sind...
weil wenn dem so sei, kann ich ja die Größe gar nicht feststellen...
komisch...


//edit
sorry geht....
man sieht bloß die pfeile nicht, weil der style-sheet fehlt Ooops

kannst den noch mit reinhauen plz?
Zitat:
.big {
font-size:36px;
color: #ffffff;
font-weight:bold;
font-family: Verdana;}


Zuletzt bearbeitet von fyll am Do 25.03.2004 10:35, insgesamt 1-mal bearbeitet
  View user's profile Private Nachricht senden
fyll
Threadersteller

Dabei seit: 20.09.2003
Ort: Augsburg
Alter: 39
Geschlecht: Männlich
Verfasst Do 25.03.2004 11:00
Titel

Antworten mit Zitat Zum Seitenanfang

...
und bitte noch, wenn du grad beim CSS einfügen bist, oben statt "Reichspunkte" "RP's" oder so...
die Schrift geht nämilch in den Statuenkopf rein....

Grins Lächel *zwinker*
DANGÖÖÖÖÖÖÖÖÖ
  View user's profile Private Nachricht senden
 
Ähnliche Themen XML-Parser
RSS Parser Software
RSS Reader/parser - javascript only ?
iphone auf dem PC testen
Webseiten testen
Webseiten auf Mac und PC testen …
Neues Thema eröffnen   Neue Antwort erstellen Seite: Zurück  1, 2, 3, 4  Weiter
MGi Foren-Übersicht -> Programmierung


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.