I'm trying to manipulate XML data with XMLStarlet for translation purposes as asked in Translate text nodes of GraphML XML (CAS)? but although the nodes I am trying to read are returned, there is whitespace/newlines returned. Sample XML can be found in the other question and the program call is as follows:
xml sel --noblanks --text --template --nl --value-of "//y:NodeLabel" --value-of "//y:EdgeLabel" my.graphml
... The node's text ... The edge's text ...
... represents a blank line)
I would like an explanation of what is happening and whether the result is to be expected or if this is caused by XMLStarlet. A fixed program call would be appreciated, but of course alternative programs or - if neccessary - filtering the blank lines would be acceptable as well (grep/sed/awk, CMD).