Class StAXDialectDetector
java.lang.Object
org.apache.axiom.util.stax.dialect.StAXDialectDetector
Detects StAX dialects and normalizes factories for a given StAX implementation.
Note that this class internally maintains a cache of detected dialects. The overhead caused by invocations of methods in this class is thus small.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StAXDialectgetDialect(Class implementationClass) Detect the dialect of a given StAX implementation.static XMLInputFactorynormalize(XMLInputFactory factory) Detect the dialect of a givenXMLInputFactoryand normalize it.static XMLOutputFactorynormalize(XMLOutputFactory factory) Detect the dialect of a givenXMLOutputFactoryand normalize it.
-
Method Details
-
normalize
Detect the dialect of a givenXMLInputFactoryand normalize it.- Parameters:
factory- the factory to normalize- Returns:
- the normalized factory
- See Also:
-
normalize
Detect the dialect of a givenXMLOutputFactoryand normalize it.- Parameters:
factory- the factory to normalize- Returns:
- the normalized factory
- See Also:
-
getDialect
Detect the dialect of a given StAX implementation.- Parameters:
implementationClass- any class that is part of the StAX implementation; typically this should be aXMLInputFactory,XMLOutputFactory,XMLStreamReaderorXMLStreamWriterimplementation- Returns:
- the detected dialect
-