public class UnhandledElementCounter extends Object implements NamespaceCallbackHandler
NamespaceCallbackHandler implementation that counts every occurrence of any element that is not (yet) handled by this library.
Add an instance to any number of PodcastParser instances. Generate a report using
toString().
This implementation is threadsafe.
| Constructor and Description |
|---|
UnhandledElementCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
registerUnhandledElement(String rootNamespace,
XMLStreamReader reader,
ParseLevel level)
Receives a callback when an element with an unknown namespace is encountered.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbeforeProcess, beforeProcess, registerUnknownNamespacepublic void registerUnhandledElement(String rootNamespace, XMLStreamReader reader, ParseLevel level)
NamespaceCallbackHandlerReceives a callback when an element with an unknown namespace is encountered. Unknown in this context means not implemented in this libary.
Note that any implementation must not move the reader. Doing so will cause an
IllegalStateException to be thrown.
registerUnhandledElement in interface NamespaceCallbackHandlerrootNamespace - String name of the root namespace (RSS|Atom)reader - XMLStreamReader instance, having just processed a
XMLStreamConstants.START_ELEMENT event.level - ParseLevel level at which the element is encounteredCopyright © 2018. All rights reserved.