whitespace_checker = strtrim (nodes3)
error: strtrim: S argument must be a string or cellstring
Does anyone know a working solution? Thanks.
"#text" objects (actually DOMText objects, see ) represent anything in between other elements in the xml tree, including white space, line breaks and regular contents. In an xml file, specially if it is indented to be human readable, most of the DOMText objects can be ignored, but not all.
Not surprisingly DOMText.getNodeValue() returns a string (see ) which is converted into an Octave string. If you want to trim this string then how about
str = strtrim (node3.getNodeValue ());
Or you could check directly in java if it only contains white space using