|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Parser
Parsers parse XML files and produce object trees .
NodeHandler
,
ParsingHandler
,
ObjectTreeElement
Method Summary | |
---|---|
void |
addElementMappingConfiguration(ElementMappingConfiguration configuration)
Adds an element mapping configuration to this parser. |
void |
addNodeHandler(NodeHandler nodeHandler)
Adds a node handler to this parser. |
Collection<? extends ElementMappingConfiguration> |
getElementMappingConfigurations()
Returns all element mapping configurations that are active for this parser. |
Collection<? extends NodeHandler> |
getNodeHandlers()
Returns all node handlers configured for this parser. |
ObjectTreeElement |
parse(Document document,
Object... rootObjects)
Parses a DOM document. |
ObjectTreeElement |
parse(File file,
Object... rootObjects)
Parses a DOM document. |
ObjectTreeElement |
parse(InputSource inputSource,
Object... rootObjects)
Parses a XML document obtained from an input source. |
ObjectTreeElement |
parse(InputStream inputStream,
Object... rootObjects)
Parses a XML document provided by a input stream. |
boolean |
removeElementMappingConfiguration(ElementMappingConfiguration configuration)
Removes an element mapping configuration from this parser. |
boolean |
removeNodeHandler(NodeHandler nodeHandler)
Removes a handler from this parser. |
Method Detail |
---|
ObjectTreeElement parse(Document document, Object... rootObjects) throws ParserException
document
- DOM documentrootObjects
- objects that should be attached to the root node
of the object tree before parsing the document
ParserException
- if an error occurs during the parsing processvoid addNodeHandler(NodeHandler nodeHandler)
nodeHandler
- handler to add to the parserboolean removeNodeHandler(NodeHandler nodeHandler)
nodeHandler
- handler to remove from this parser
true
if the handler was removed,
false
otherwiseCollection<? extends NodeHandler> getNodeHandlers()
void addElementMappingConfiguration(ElementMappingConfiguration configuration)
configuration
- mapping configuration that is going to be
used by this parserboolean removeElementMappingConfiguration(ElementMappingConfiguration configuration)
configuration
- mapping configuration that should be removed
true
if the mapping configuration has been removed,
false
otherwiseCollection<? extends ElementMappingConfiguration> getElementMappingConfigurations()
ObjectTreeElement parse(File file, Object... rootObjects) throws ParserException
file
- file containing the xml document to be parsedrootObjects
- objects that should be attached to the root node
of the object tree before parsing the document
ParserException
- if an error occurs during the parsing processObjectTreeElement parse(InputStream inputStream, Object... rootObjects) throws ParserException
inputStream
- stream to read fromrootObjects
- objects that should be attached to the root node
of the object tree before parsing the document
ParserException
- if an error occurs during the parsing processObjectTreeElement parse(InputSource inputSource, Object... rootObjects) throws ParserException
inputSource
- source providing the XML documentrootObjects
- objects that should be attached to the root node
of the object tree before parsing the document
ParserException
- if an error occurs during the parsing process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |