innerText property
String
get
innerText
Return the concatenated text value its descendants.
Implementation
String get innerText => descendants
.where((node) => node is XmlText || node is XmlCDATA)
.map((node) => node.value)
.join();
set
innerText
(String value)
Replaces the children of this node with text contents.
Implementation
set innerText(String value) {
XmlNodeTypeException.checkHasChildren(this);
children.clear();
if (value.isNotEmpty) {
children.add(XmlText(value));
}
}