refactors XMLNode to NodeVariable