buildText method
Implementation
T? buildText(DOMElement? domParent, T? parent, TextNode domNode,
DOMTreeMap<T> treeMap) {
if (domParent != null) {
domNode.parent = domParent;
}
var text = getDOMNodeText(domNode);
T? textNode;
if (parent != null) {
textNode = appendElementText(parent, text);
} else {
textNode = createTextNode(text);
}
if (textNode != null) {
treeMap.map(domNode, textNode);
}
return textNode;
}