nodeValue property

String get nodeValue

Node's nodeValue.

Implementation

String get nodeValue {
  if (referencedNode.nodeType == NodeType.TEXT_NODE) {
    TextNode textNode = referencedNode as TextNode;
    return textNode.data;
  } else if (referencedNode.nodeType == NodeType.COMMENT_NODE) {
    Comment comment = referencedNode as Comment;
    return comment.data;
  } else {
    return '';
  }
}