refactor textNode to fetch all required metadata to locate a text node