public class WhitespaceStrippedSource extends DOMSource
If you only want to remove text nodes consisting solely of
whitespace (AKA element content whitespace) but leave all other
text nodes alone you should use ElementContentWhitespaceStrippedSource
instead.
Constructor and Description |
---|
WhitespaceStrippedSource(Source originalSource)
Creates a new source that consists of the given source with all
empty text nodes removed and all non-empty text nodes trimmed.
|
WhitespaceStrippedSource(Source originalSource,
DocumentBuilderFactory dbf)
Creates a new source that consists of the given source with all
empty text nodes removed and all non-empty text nodes trimmed.
|
public WhitespaceStrippedSource(Source originalSource)
originalSource
- the original sourcepublic WhitespaceStrippedSource(Source originalSource, DocumentBuilderFactory dbf)
originalSource
- the original sourcedbf
- the DocumentBuilderFactory to use when creating a
DOM document from originalSourceCopyright © 2001–2020 XMLUnit. All rights reserved.