Leading, but not trailing, whitespace in text ignored by Swing HTML parser?
It seems that the Swing HTML parser in JDK 1.4.2 ignores whitespace at the beginning of text, but not at the end. When using a ParserDelegator to read this HTML:
X Y Z
handleText is called in my ParserCallback 3 times:
2. "Y "
The second call has a space after, but not before.
Does anyone know why this is? Is this part of the HTML standard? (Mozilla renders that string with a space between XY and between YZ.)
Does anyone know of a workaround I could use to read that space as part of the text?