help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trim XML whitespace


From: ngdias
Subject: Trim XML whitespace
Date: Thu, 23 Mar 2017 12:48:58 -0700 (PDT)

I'm getting this:

"#text"
"Options"
"#text"
"Tracks"
"#text"
"Analysis"
"#text"
"Summary"
"#text"

>From looping through a XML node and the Internet tells me the "#text" are
whitespace that can be skipped byt something like  this solution
<http://stackoverflow.com/questions/4650878/how-to-remove-text-from-my-node-parsing-in-java-dom-xml-parsing>
 
:

whitespace_checker = nodes3.getNodeValue().trim();

but this line of code throws an error:
error: sq_string cannot be indexed with .

strtrim () also doesn't work, as it seems to be incompatible with this
particular object type
https://www.gnu.org/software/octave/doc/v4.0.0/Manipulating-Strings.html#XREFstrtrim

whitespace_checker = strtrim (nodes3)
error: strtrim: S argument must be a string or cellstring

Does anyone know a working solution? Thanks.




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Trim-XML-whitespace-tp4682594.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]