public class SchemaWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
enable
Deprecated.
|
| Constructor and Description |
|---|
SchemaWriter()
A constructor to create an empty uninitialized SchemaWriter via XMLContext.
|
SchemaWriter(DocumentHandler handler)
Creates a new SchemaWriter for the given DocumentHandler.
|
SchemaWriter(Writer writer)
Creates a new SchemaWriter for the given Writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setDocumentHandler(DocumentHandler documentHandler)
To directly set a DocumentHandler.
|
void |
setDocumentHandler(Writer writer)
To set the DocumentHandler to a Writer - which is wrapped by a serializer.
|
void |
setSchemaContext(SchemaContext schemaContext)
To set the
SchemaContext to be used for the SchemaWriter. |
void |
write(Schema schema) |
public static boolean enable
public SchemaWriter(Writer writer) throws IOException
writer - the Writer to serialize toIOException - in case taht wrapping the Writer failspublic SchemaWriter(DocumentHandler handler)
handler - the DocumentHandler to send events topublic SchemaWriter()
public void setSchemaContext(SchemaContext schemaContext)
SchemaContext to be used for the SchemaWriter.schemaContext - the SchemaContext to be usedpublic void setDocumentHandler(Writer writer) throws IOException
writer - the Writer to use for outputIOException - in case the Writer cannot be used for DocumentHandlerpublic void setDocumentHandler(DocumentHandler documentHandler)
documentHandler - set the DocumentHandlerpublic void write(Schema schema) throws SAXException
SAXExceptionCopyright © 2021. All rights reserved.