Order SimpleXMLElement by element

Posted by ron on Stack Overflow See other posts from Stack Overflow or by ron
Published on 2010-04-08T02:12:45Z Indexed on 2010/04/08 2:33 UTC
Read the original article Hit count: 321

Filed under:
|

Hi everyone

I need to order a SimpleXMLElement by a node called padre like this.

$xml = new SimpleXMLElement('sitemap.xml',null,true); sort($xml, "padre" );
foreach($xml as $url ) { echo "loc}' title='".rescue_name($url->loc)."'>".rescue_name($url->loc)." {$url->padre}
";

  }

I don't know why is not working please let me know what is my error. Thanks in advance

© Stack Overflow or respective owner

Related posts about php5

Related posts about object