Preserving whitespace in html to TextConverter
The XML objects in Flash have a tendency to remove all whitespace. So if I choose to represent HTML as XML when I'm passing it to TextConverter or an importer:
<html>My <b>great</b> idea</html>
- it trims the space after "My" and before "idea", so my text looks like this:
Mygreatidea
- which is unacceptable. ![]()
Right now I'm doing this weird jump-through-hoops in order for Flash to preserve that white space:
XML.ignoreWhitespace = XML.prettyPrinting = false; myXML = <html>My <b>great</b> idea</html>; XML.ignoreWhitespace = XML.prettyPrinting = true;
- which works, but is awful to look at. Is there any other way to preserve whitespace in the HTML? (And passing it as a String instead is not an option, because then all the quote characters have to be escaped, which makes things even worse.)
