When you write this kind of repetitive code, the first thought that should come to your mind should be: I'm doing something wrong. This kind of code is hard to maintain and badly conveys what you actually want to do. If you create some functions to take care of the repetitive stuff, you'll code become much clearer, less prone to errors and easier to maintain.
As to your actual question; I don't believe flush does anything on a stringstream and clear only clears the error state of the stream. The easiest is to just create a new stringstream instance.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
1) How do I call ToStr from SetXMLAttribute, the above code doesn't compile
2) Isn't it a good idea to use DOMElement * instead of DOMElement& because the interface requires a pointer as the argument.
Thanks
Jack
Bookmarks