Implemented recursive getnodesbytagname