What's in $xpath and what does it look like after formatting ?
In reply to Re^5: Select Node by poj in thread Select Node by Arenas