spring-framework / org.springframework.util.xml / DomUtils / getTextValue

getTextValue

open static fun getTextValue(valueEle: Element): String

Extracts the text value from the given DOM element, ignoring XML comments.

Appends all CharacterData nodes and EntityReference nodes into a single String value, excluding Comment nodes. Only exposes actual user-specified text, no default values of any kind.

See Also
CharacterDataEntityReferenceComment