Posted on 2006-04-23
Not sure what is going wrong with this but I need some help figuring this out.
I have a String str = n.getNodeValue();
If I do a System.out.println(str) the program will display the information but with whitespaces and newlines
Which leads me to belive that .trim() would be the best option for this kind of thing.
The problem is, when I edit the str in any manor I get a error on that same line the edit took place.
Any idea why this might happen and or a fix for this problem?
String str = n.getNodeValue();
System.out.println(str.trim()); <-----Error here (when edit takes place to str)
//System.out.pritln(str); <-------------This code would work (format looks bad)