collectElementChildText method

String? collectElementChildText()

Implementation

String? collectElementChildText() {
  StringBuffer buffer = StringBuffer();
  childNodes.forEach((node) {
    if (node is TextNode) {
      buffer.write(node.data);
    }
  });
  if (buffer.isNotEmpty) {
    return buffer.toString();
  } else {
    return null;
  }
}