Monday 01 March 2010 6:55:56 am
Hello, Thanks... I have walked the tree, I now have access to all nodes (quite fast)... I am triying to access each attribute (I need to display "attribute name" and its "valus", but even with the help of friends this weekend we did not manage to do nothing: Can you give me a hand? This is the code: <code> //this works fine, it displays all the nodes
$cli->output( 'node found: "' . $node->attribute( 'name' ) . '" (' . $node->attribute( 'node_id' ) . ')' );
$mynodeArray = $node->attribute( 'data_map' );
$mycounter = -1;
////// I need to go trough all the attributes and display them (name and value)
foreach ( $mynodeArray as $myattr )
{
$mycounter += 1;
//var_dump( $myattr );
} </code> Please look at the commented lines in the code. Another question: an you point out what to use to save the values to a file? Thanks
Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com
|