Ver Mensaje Individual
  #7 (permalink)  
Antiguo 01/04/2013, 18:07
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 10 meses
Puntos: 793
Respuesta: duda en datos repetido en xml

Es lo mismo:

Código PHP:
Ver original
  1. <?php
  2.  
  3. $sxe = simplexml_load_file('test.xml');
  4. $filtrado = $sxe->xpath('//user-view[not(@sid=preceding-sibling::user-view/@sid)]');
  5.  
  6. foreach ($filtrado as $v) {
  7.     echo $v->attributes()->sid . ' ' . $v->attributes()->users . '<br />';
  8. }
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP