public class NormalizedSource extends DOMSource
For Nodes this means adjacent text nodes are merged to single nodes and empty Text nodes removed (recursively). For Documents and Sources additional normalization steps may be taken depending on your DOMConfiguration. See the linked JavaDocs for details.
When reading documents a parser usually puts the document into normalized form anway. You will only need to perform XML normalization on DOM trees you have created programmatically.
Constructor and Description |
---|
NormalizedSource() |
NormalizedSource(Document doc)
Creates a new source that is created by "normalizing" the given
document.
|
NormalizedSource(Document doc,
String systemId)
Creates a new source that is created by "normalizing" the given
document.
|
NormalizedSource(Node n)
Creates a new source that is created by "normalizing" the given
node.
|
NormalizedSource(Node n,
String systemId)
Creates a new source that is created by "normalizing" the given
node.
|
NormalizedSource(Source originalSource)
Creates a new source that is created by "normalizing" the given
source.
|
Modifier and Type | Method and Description |
---|---|
void |
setNode(Node n) |
getNode, getSystemId, setSystemId
public NormalizedSource()
public NormalizedSource(Source originalSource)
See the class-level JavaDocs for details.
originalSource
- the original sourcepublic NormalizedSource(Document doc)
See the class-level JavaDocs for details.
doc
- the original sourcepublic NormalizedSource(Document doc, String systemId)
See the class-level JavaDocs for details.
doc
- the original sourcesystemId
- the system id to use for the new sourcepublic NormalizedSource(Node n)
See the class-level JavaDocs for details.
n
- the original nodeCopyright © 2001–2017 XMLUnit. All rights reserved.