Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Yes, this is exactly what I was looking for. Only thing I can't figure now is how to not include previous line from XML file. As now it appends values from previous line + current line. Commented Nov 10, 2010 at 13:13
  • Well, it is just a matter of clearing the StringBuffer (or creating a new one) when you detect the new line. From your code snippet it isn't clear when this condition would occur. I expected that the while loop was entered on the beginning of a line (with a freshly created StringBuffer) - from what you are saying this isn't the case. Commented Nov 11, 2010 at 8:00
  • Yes, you're right. I found it then that I need to clear StringBuffer. I did it that it clears everytime when while loop begins. Thanks for help! Commented Nov 12, 2010 at 14:30