public interface XMLChildrenIncluder
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Return the charset to use to write the content.
|
String |
getContent()
Return a String representing the XML content.
|
ErrorHandler |
getErrorHandler()
Return the ErrorHandler which will be fired for warnings and errors when
parsing the content.
|
Reader |
getReader()
Return a Reader to the XML content.
|
boolean |
isAddingComments()
Return true if a comment must be added for each included file.
|
boolean |
isEnablingDeepComments()
Return true if the comments in deep include declarations must be added.
|
static void |
resetSAXParserFactoryImplementation()
Reset the SAXParser factory implementation to the default.
|
default void |
setAddComments(boolean addComments)
Set if a comment must be added for each included file.
|
void |
setAddComments(boolean addComments,
boolean deep)
Set if a comment must be added for each included file.
|
void |
setCharset(Charset charset)
Set the charset to use to write the content.
|
void |
setDefaultBaseDirectory(URL baseDir)
Set the default base directory for including files.
|
void |
setErrorHandler(ErrorHandler errorHandler)
Set the ErrorHandler which will be fired for warnings and errors when
parsing the content.
|
void |
setFile(File file)
Set the includer file.
|
void |
setInputStream(InputStream stream)
Set the includer InputStream.
|
default void |
setSAXParserFactoryImplementation(String factoryClassName)
Set the SAXParser factory implementation.
|
void |
setURL(URL url)
Set the includer URL.
|
void |
write(File file)
Write the resulting XML to a File.
|
void |
write(URL url)
Write the resulting XML to an URL.
|
void setFile(File file) throws MalformedURLException
file
- the fileMalformedURLException
void setURL(URL url)
url
- the URLvoid setInputStream(InputStream stream)
stream
- the InputStreamdefault void setAddComments(boolean addComments)
addComments
- true if a comment must be added for each included filevoid setAddComments(boolean addComments, boolean deep)
addComments
- true if a comment must be added for each included filedeep
- true if the comments in deep include declarations must be addedboolean isAddingComments()
void setCharset(Charset charset)
StandardCharsets.UTF_8
.charset
- the charsetCharset getCharset()
boolean isEnablingDeepComments()
void setErrorHandler(ErrorHandler errorHandler)
errorHandler
- the ErrorHandlerErrorHandler getErrorHandler()
void setDefaultBaseDirectory(URL baseDir)
baseDir
- the default base directorydefault void setSAXParserFactoryImplementation(String factoryClassName)
factoryClassName
- the factory class namestatic void resetSAXParserFactoryImplementation()
String getContent()
Reader getReader()
void write(File file) throws IOException
file
- the FileIOException
void write(URL url) throws IOException
url
- the URLIOException