xml auslesen

Methos

Erfahrenes Mitglied
Wie kriege ich den folgenden Inhalt raus?

Ich schaffs leider nur so:

PHP:
  foreach ($artikel->ItemAttributes->Creator as $creator) {
    //$authors .= empty($authors) ? $author : ', ' . $author;
    echo "$creator<br>";
  }

Allerdings erhalte ich hier ja nur die Namen, allerdings ohne Trennung von Darsteller und Regisseur.

PHP:
<ItemAttributes>
  <Creator Role="Regisseur">Tony Dow</Creator> 
  <Creator Role="Darsteller">Michael O'Hare</Creator> 
  <Creator Role="Darsteller">Bruce Boxleitner</Creator> 
  <Creator Role="Darsteller">Claudia Christian</Creator> 
  <Creator Role="Darsteller">Tracy Scoggins</Creator> 
  <Creator Role="Darsteller">Jerry Doyle</Creator> 
  <Creator Role="Darsteller">Mira Furlan</Creator> 
  <Creator Role="Darsteller">Andreas Katsulas</Creator> 
  <Creator Role="Darsteller">Peter Jurasik</Creator> 
  <Creator Role="Darsteller">Richard Biggs</Creator> 
  <Creator Role="Darsteller">Bill Mumy</Creator> 
  <Creator Role="Darsteller">Stephen Furst</Creator> 
  <Creator Role="Darsteller">Andrea Thompson</Creator> 
  <Creator Role="Darsteller">Patricia Tallman</Creator> 
  <Creator Role="Darsteller">Jason Carter</Creator> 
  <Creator Role="Darsteller">Jeff Conaway</Creator> 
  <Creator Role="Darsteller">Robert Rusler</Creator> 
  <Creator Role="Darsteller">Julie Caitlin Brown</Creator> 
  <Creator Role="Darsteller">Mary Kay Adams</Creator> 
  <Creator Role="Darsteller">Haley McLane</Creator> 
  <Director>Tony Dow</Director> 
  <Manufacturer>Warner Home Video - DVD</Manufacturer> 
  <ProductGroup>DVD</ProductGroup> 
  <Title>Spacecenter Babylon 5 - Die Zusammenkunft</Title> 
  </ItemAttributes>
 

Neue Beiträge

Zurück