methods for tokenizing attributes and nodes