Class DomDriver
java.lang.Object
com.thoughtworks.xstream.io.AbstractDriver
com.thoughtworks.xstream.io.xml.AbstractXmlDriver
com.thoughtworks.xstream.io.xml.DomDriver
- All Implemented Interfaces:
HierarchicalStreamDriver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DocumentBuilderFactoryCreate the DocumentBuilderFactory instance.createReader(File in) Create the HierarchicalStreamReader with the stream parser reading from a File.Create the HierarchicalStreamReader with the stream parser reading from the input stream.createReader(Reader in) Create the HierarchicalStreamReader with the stream parser reading from the IO reader.createReader(URL in) Create the HierarchicalStreamReader with the stream parser reading from a URL.private HierarchicalStreamReadercreateReader(InputSource source) createWriter(OutputStream out) Create the HierarchicalStreamWriter with the formatted writer.createWriter(Writer out) Create the HierarchicalStreamWriter with the formatted writer.Methods inherited from class AbstractXmlDriver
xmlFriendlyReplacerMethods inherited from class AbstractDriver
getNameCoder
-
Field Details
-
encoding
-
documentBuilderFactory
-
-
Constructor Details
-
DomDriver
public DomDriver()Construct a DomDriver. -
DomDriver
Construct a DomDriver with a specified encoding. The created DomReader will ignore any encoding attribute of the XML header though. -
DomDriver
-
DomDriver
Deprecated.As of 1.4, useDomDriver(String, NameCoder)instead.- Since:
- 1.2
-
-
Method Details
-
createReader
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamReader with the stream parser reading from the IO reader.- Parameters:
in- theReaderwith the data to parse- Returns:
- the HierarchicalStreamReader
-
createReader
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamReader with the stream parser reading from the input stream.- Parameters:
in- theInputStreamwith the data to parse
-
createReader
Description copied from class:AbstractDriverCreate the HierarchicalStreamReader with the stream parser reading from a URL. Depending on the parser implementation, some might take the URL as SystemId to resolve additional references.- Specified by:
createReaderin interfaceHierarchicalStreamDriver- Overrides:
createReaderin classAbstractDriver- Parameters:
in- theURLdefining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-
createReader
Description copied from class:AbstractDriverCreate the HierarchicalStreamReader with the stream parser reading from a File. Depending on the parser implementation, some might take the file path as SystemId to resolve additional references.- Specified by:
createReaderin interfaceHierarchicalStreamDriver- Overrides:
createReaderin classAbstractDriver- Parameters:
in- theURLdefining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-
createReader
-
createWriter
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamWriter with the formatted writer.- Parameters:
out- theWriterto receive the formatted data- Returns:
- the HierarchicalStreamWriter
-
createWriter
Description copied from interface:HierarchicalStreamDriverCreate the HierarchicalStreamWriter with the formatted writer.- Parameters:
out- theOutputStreamto receive the formatted data- Returns:
- the HierarchicalStreamWriter
-
createDocumentBuilderFactory
Create the DocumentBuilderFactory instance.- Returns:
- the new instance
- Since:
- 1.4.9
-
DomDriver(String, NameCoder)instead.