T - the object type to read/write@Experimental public interface XmlFactory<T> extends Service
| Modifier and Type | Method and Description |
|---|---|
default T |
fromXmlString(String xml)
Simply parse the given xml string.
|
default T |
read(InputStream input) |
default T |
read(InputStream input,
boolean strict) |
default T |
read(Path path) |
default T |
read(Path path,
boolean strict) |
default T |
read(Reader reader) |
default T |
read(Reader reader,
boolean strict) |
T |
read(XmlReaderRequest request) |
default String |
toXmlString(T content)
Simply converts the given content to an xml string.
|
default void |
write(T content,
OutputStream outputStream) |
default void |
write(T content,
Path path) |
default void |
write(T content,
Writer writer) |
void |
write(XmlWriterRequest<T> request) |
@Nonnull default T read(@Nonnull Path path) throws XmlReaderException
XmlReaderException@Nonnull default T read(@Nonnull Path path, boolean strict) throws XmlReaderException
XmlReaderException@Nonnull default T read(@Nonnull InputStream input) throws XmlReaderException
XmlReaderException@Nonnull default T read(@Nonnull InputStream input, boolean strict) throws XmlReaderException
XmlReaderException@Nonnull default T read(@Nonnull Reader reader) throws XmlReaderException
XmlReaderException@Nonnull default T read(@Nonnull Reader reader, boolean strict) throws XmlReaderException
XmlReaderException@Nonnull T read(@Nonnull XmlReaderRequest request) throws XmlReaderException
XmlReaderExceptiondefault void write(@Nonnull T content, @Nonnull Path path) throws XmlWriterException
XmlWriterExceptiondefault void write(@Nonnull T content, @Nonnull OutputStream outputStream) throws XmlWriterException
XmlWriterExceptiondefault void write(@Nonnull T content, @Nonnull Writer writer) throws XmlWriterException
XmlWriterExceptionvoid write(@Nonnull XmlWriterRequest<T> request) throws XmlWriterException
XmlWriterExceptiondefault T fromXmlString(@Nonnull String xml) throws XmlReaderException
xml - the input xml stringXmlReaderException - if an error occurs during the parsingtoXmlString(Object)default String toXmlString(@Nonnull T content) throws XmlWriterException
content - the object to convertXmlWriterException - if an error occurs during the transformationfromXmlString(String)Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.