- Index
- »
- xml
- »
- func:xmlVal
def
func:xmlVal
xmlVal(node)
If node is an attribute, then return its value string. If node is an element return its first text child node, otherwise null. If node is null, then return null.
Examples:
xmlRead("<x/>").xmlVal >> null xmlRead("<x>hi</x>").xmlVal >> "hi" xmlRead("<x a='v'/>").xmlAttr("a").xmlVal >> "v" xmlRead("<x/>").xmlAttr("a", false).xmlVal >> null