I am currently working on a program that allows me to enter HTML source code into a RichTextBox control and removes the spaces from in between markups. The only problem is, I am not sure how I can differentiate between the spaces BETWEEN the markups and the spaces INSIDE the markups. Obviously, removing the spaces inside the markups would be bad. Any ideas as to how I can tell the difference?
Example: (before white space is removed)
<p>blahblahblah</p> <p>blahblahblah</p>
Example: (after white space is removed)
<p>blahblahblah</p><p>blahblahblah</p>
blahblahblah
blahblahblah
The space in between the 2 paragraphs. – user Nov 07 '09 at 02:44