public class XmlConfigurationParser extends XmlParserBase
Configuration object.
By default this class uses a validating parser (configurable).
Following system properties can be used for customizing parser behavior:
RootElementBuildercoreNamespace| Constructor and Description |
|---|
XmlConfigurationParser()
Constructs a parser having validation enabled with a ErrorHandler that only logs the parser errors.
|
XmlConfigurationParser(boolean validating,
ErrorHandler errorHandler)
|
XmlConfigurationParser(ErrorHandler errorHandler)
If validation is on (default) one can specify an error handler for handling validation errors.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValidating() |
boolean |
isValidElementRoot(Element element)
Tests whether the element passed in is a modern (3.0) config element rather than a legacy one.
|
Configuration |
parseElement(Element root)
Root should be the jbosscache element in the configuration file.
|
Configuration |
parseElementIgnoringRoot(Element root) |
Configuration |
parseFile(String filename)
Parses an XML file and returns a new configuration.
|
Configuration |
parseStream(InputStream configStream)
Similar to
parseFile(String), just that it does not create the input stream. |
assertNotLegacyElement, existsAttribute, getAllowedCoreNamespaces, getAttributeValue, getBoolean, getInt, getLong, getSingleElement, getSingleElementInCoreNS, isAllowedCoreNamespacepublic XmlConfigurationParser(ErrorHandler errorHandler)
public XmlConfigurationParser(boolean validating,
ErrorHandler errorHandler)
validating - should the underlaying parser disable the validation?public XmlConfigurationParser()
public Configuration parseFile(String filename)
FileLookup is used.FileLookuppublic Configuration parseStream(InputStream configStream)
parseFile(String), just that it does not create the input stream.public Configuration parseElement(Element root)
public Configuration parseElementIgnoringRoot(Element root)
public boolean isValidating()
public boolean isValidElementRoot(Element element)
element - element to testCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.