public abstract class ParserConfigurator extends Object implements ExtensionPoint, Serializable
XML parsing is a complex enough activity that often certain degree of customization of the parsing behaviour is desired. This extension point enables that. To avoid creating new extension point for each different parsing scene, this extension point takes the type-less "context" argument, which should identify the context of the parse by type.
This extension point is added late in the game, so existing XML parsing behaviour should be retrofitted to use this as we find them. Similarly, additional overloaded versions are likely needed to support SAX, JAXP, and other means of parsing.
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
ParserConfigurator() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<ParserConfigurator> |
all()
Returns all the registered
ParserConfigurator s. |
static void |
applyConfiguration(org.dom4j.io.SAXReader reader,
Object context) |
void |
configure(org.dom4j.io.SAXReader reader,
Object context)
Configures the given
SAXReader |
public void configure(org.dom4j.io.SAXReader reader, Object context)
SAXReader
context
- Object that represents the context in which the parser is used.
It is up to the caller to decide what to pass in here.public static ExtensionList<ParserConfigurator> all()
ParserConfigurator
s.public static void applyConfiguration(org.dom4j.io.SAXReader reader, Object context) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2004–2018. All rights reserved.