I’m parsing XML and for now I use nodeTextValue.length() > 0 to check whether the nodeTextValue is valid string, but I’m having issues with \n \r and so on, preceding and following nodeText, is there an existing class to trim string on both ways not just after so it returns the valid string
I’m using stax
trim() will remove leading and trailing whitespace.