Package org.xmlunit.builder
Class Input
java.lang.Object
org.xmlunit.builder.Input
Fluent API to create Source instances.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Input.TransformationBuilderBuild a Source by XSLT transforming a different Source.static Input.TransformationBuilderBuild a Source by XSLT transforming a different Source.static Input.BuilderReturn the matching Builder for the supported types:Source,Input.Builder,Document,Node, byte[] (XML as byte[]),String(XML as String),File(contains XML),URL(to an XML-Document),URI(to an XML-Document),InputStream,ReadableByteChannel,Path, Jaxb-Object(marshal-able withJAXB.marshal(...))static Input.BuilderfromByteArray(byte[] b) Build a Source from an array of bytes.static Input.BuilderBuild a Source from a channel.static Input.BuilderBuild a Source from a DOM Document.static Input.BuilderBuild a Source from a file.static Input.BuilderBuild a Source from a named file.static JaxbBuilderBuild a Source from a Jaxb-Object.static Input.BuilderBuild a Source from a DOM Node.static Input.BuilderBuild a Source from a Path.static Input.BuilderfromReader(Reader r) Build a Source from a reader.static Input.BuilderBuild a Source from a stream.static Input.BuilderfromString(String s) Build a Source from a string.static Input.BuilderBuild a Source from an URI.static Input.BuilderBuild a Source from an URI.static Input.BuilderBuild a Source from an URL.
-
Method Details
-
fromDocument
Build a Source from a DOM Document.- Parameters:
d- the document to use as source- Returns:
- a new builder
-
fromNode
Build a Source from a DOM Node.- Parameters:
n- the node to use as source- Returns:
- a new builder
-
from
Return the matching Builder for the supported types:Source,Input.Builder,Document,Node, byte[] (XML as byte[]),String(XML as String),File(contains XML),URL(to an XML-Document),URI(to an XML-Document),InputStream,ReadableByteChannel,Path, Jaxb-Object(marshal-able withJAXB.marshal(...))- Parameters:
object- the object to use as source- Returns:
- a new builder
-
fromJaxb
Build a Source from a Jaxb-Object.- Parameters:
jaxbObject- the object to use as source- Returns:
- a new builder
-
fromFile
Build a Source from a file.- Parameters:
f- the file to use as source- Returns:
- a new builder
-
fromFile
Build a Source from a named file.- Parameters:
name- name of the file to use as source- Returns:
- a new builder
-
fromStream
Build a Source from a stream.- Parameters:
s- the stream to use as source- Returns:
- a new builder
-
fromReader
Build a Source from a reader.- Parameters:
r- the reader to use as source- Returns:
- a new builder
-
fromString
Build a Source from a string.- Parameters:
s- the string to use as source- Returns:
- a new builder
-
fromByteArray
Build a Source from an array of bytes.- Parameters:
b- the bytes to use as source- Returns:
- a new builder
-
fromChannel
Build a Source from a channel.- Parameters:
c- the channel to use as source- Returns:
- a new builder
-
fromURL
Build a Source from an URL.- Parameters:
url- the url to use as source- Returns:
- a new builder
-
fromURI
Build a Source from an URI.- Parameters:
uri- must represent a valid URL- Returns:
- a new builder
-
fromURI
Build a Source from an URI.- Parameters:
uri- must represent a valid URL- Returns:
- a new builder
-
fromPath
Build a Source from a Path.- Parameters:
path- a Path- Returns:
- a new builder
- Since:
- XMLUnit 2.8.0
-
byTransforming
Build a Source by XSLT transforming a different Source.- Parameters:
s- the source to transform- Returns:
- a new builder
-
byTransforming
Build a Source by XSLT transforming a different Source.- Parameters:
b- builder providing the source to transform- Returns:
- a new builder
-