added capability in xml interface to get number of nodes and select a certain node index