org.sourceprojects.xmlparser
Interface XmlParser<B>

Type Parameters:
B - Type of ContextObject to use

Deprecated. Use LyciaParser instead

@Deprecated
public interface XmlParser<B>

Interface definition of XmlParser.
Standard implementation of this interface returned by XmlParserFactory implements a standard behaviour to redirect all registered tags to the corresponding TagDefinitionParsers.

Since:
0.0.1
Author:
noctarius

Method Summary
 void addProgressListener(ProgressListener listener)
          Deprecated. Adds a ProgressListener instance to the notify list
 void addTagDefinitionParser(TagDefinitionParser<B> definitionParser)
          Deprecated. Adds a TagDefinitionParser implementation to the instance of XmlParser
 void addTagDefinitionParsers(TagDefinitionParser<B>[] definitionParsers)
          Deprecated. Adds a bunch of TagDefinitionParser implementations to the instance of XmlParser
 ErrorHandler getErrorHandler()
          Deprecated. Returns an instance of ErrorHandler
 ParserContext<B> getParserContext()
          Deprecated. Returns an instance of ParserContext
 ResourceResolver getResourceResolver()
          Deprecated. Returns an instance of ResourceResolver
 boolean isValidatingSchema()
          Deprecated. Returns if XmlParser implementation should be aware of schema errors on reading Xml documents
Not all SAX parser implementations are able to do schema validation.
 void parse(File file)
          Deprecated. Starts parsing Xml data from given File
 void parse(InputStream inputStream)
          Deprecated. Starts parsing Xml data from given InputStream implementation
 void parse(Reader reader)
          Deprecated. Starts parsing Xml data from given Reader implementation
 void parse(String xml)
          Deprecated. Starts parsing Xml data from given String
 void removeProgressListener(ProgressListener listener)
          Deprecated. Removes a ProgressListener instance from the notify list
 void removeTagDefinitionParser(TagDefinitionParser<B> definitionParser)
          Deprecated. Removes a TagDefinitionParser implementation from the instance of XmlParser
 void removeTagDefinitionParsers(TagDefinitionParser<B>[] definitionParsers)
          Deprecated. Removes a bunch of TagDefinitionParser implementations from the instance of XmlParser
 void setErrorHandler(ErrorHandler errorHandler)
          Deprecated. Sets an instance of of ErrorHandler
 void setParserContext(ParserContext<B> parserContext)
          Deprecated. Sets an instance of ParserContext
 void setResourceResolver(ResourceResolver resourceResolver)
          Deprecated. Sets an instance of ResourceResolver
 void setValidatingSchema(boolean validatingSchema)
          Deprecated. Sets if XmlParser implementation should be aware of schema errors on reading Xml documents.
 Document transform(File file)
          Deprecated. Starts transforming Xml data from given File to new Document instance
 Document transform(InputStream inputStream)
          Deprecated. Starts transforming Xml data from given InputStream to new Document instance
 Document transform(Reader reader)
          Deprecated. Starts transforming Xml data from given Reader to new Document instance
 Document transform(String xml)
          Deprecated. Starts transforming Xml data from given String to new Document instance
 

Method Detail

addTagDefinitionParser

void addTagDefinitionParser(TagDefinitionParser<B> definitionParser)
Deprecated. 
Adds a TagDefinitionParser implementation to the instance of XmlParser

Parameters:
definitionParser - TagDefinitionParser implementation to add

addTagDefinitionParsers

void addTagDefinitionParsers(TagDefinitionParser<B>[] definitionParsers)
Deprecated. 
Adds a bunch of TagDefinitionParser implementations to the instance of XmlParser

Parameters:
definitionParsers - Array of TagDefinitionParser implementations to add

removeTagDefinitionParser

void removeTagDefinitionParser(TagDefinitionParser<B> definitionParser)
Deprecated. 
Removes a TagDefinitionParser implementation from the instance of XmlParser

Parameters:
definitionParser - TagDefinitionParser implementation to remove

removeTagDefinitionParsers

void removeTagDefinitionParsers(TagDefinitionParser<B>[] definitionParsers)
Deprecated. 
Removes a bunch of TagDefinitionParser implementations from the instance of XmlParser

Parameters:
definitionParsers - Array of TagDefinitionParser implementations to remove

parse

void parse(Reader reader)
           throws XmlParserParsingException
Deprecated. 
Starts parsing Xml data from given Reader implementation

Parameters:
reader - Reader to read Xml data from
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

parse

void parse(String xml)
           throws XmlParserParsingException
Deprecated. 
Starts parsing Xml data from given String

Parameters:
xml - A String filled with Xml data
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

parse

void parse(InputStream inputStream)
           throws XmlParserParsingException
Deprecated. 
Starts parsing Xml data from given InputStream implementation

Parameters:
inputStream - InputStream to read Xml data from
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

parse

void parse(File file)
           throws XmlParserParsingException
Deprecated. 
Starts parsing Xml data from given File

Parameters:
file - File to read Xml data from
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transform

Document transform(Reader reader)
                   throws XmlParserParsingException
Deprecated. 
Starts transforming Xml data from given Reader to new Document instance

Parameters:
reader - Reader to read Xml data from
Returns:
A new Document instance with transformed data
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transform

Document transform(String xml)
                   throws XmlParserParsingException
Deprecated. 
Starts transforming Xml data from given String to new Document instance

Parameters:
xml - A String filled with Xml data
Returns:
A new Document instance with transformed data
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transform

Document transform(InputStream inputStream)
                   throws XmlParserParsingException
Deprecated. 
Starts transforming Xml data from given InputStream to new Document instance

Parameters:
inputStream - InputStream to read Xml data from
Returns:
A new Document instance with transformed data
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

transform

Document transform(File file)
                   throws XmlParserParsingException
Deprecated. 
Starts transforming Xml data from given File to new Document instance

Parameters:
file - File to read Xml data from
Returns:
A new Document instance with transformed data
Throws:
XmlParserParsingException - Is thrown when some error occurs. Implementation specific exceptions are wrapped into XmlParserParsingException

setParserContext

void setParserContext(ParserContext<B> parserContext)
Deprecated. 
Sets an instance of ParserContext

Parameters:
parserContext - ParserContext instance to set

getParserContext

ParserContext<B> getParserContext()
Deprecated. 
Returns an instance of ParserContext

Returns:
ParserContext instance

setResourceResolver

void setResourceResolver(ResourceResolver resourceResolver)
Deprecated. 
Sets an instance of ResourceResolver

Parameters:
resourceResolver - ResourceResolver instance to set

getResourceResolver

ResourceResolver getResourceResolver()
Deprecated. 
Returns an instance of ResourceResolver

Returns:
ResourceResolver instance

setErrorHandler

void setErrorHandler(ErrorHandler errorHandler)
Deprecated. 
Sets an instance of of ErrorHandler

Parameters:
errorHandler - ErrorHandler instance

getErrorHandler

ErrorHandler getErrorHandler()
Deprecated. 
Returns an instance of ErrorHandler

Returns:
ErrorHandler instance

isValidatingSchema

boolean isValidatingSchema()
Deprecated. 
Returns if XmlParser implementation should be aware of schema errors on reading Xml documents
Not all SAX parser implementations are able to do schema validation. If SAX parser does not support schema validation a warning is shown but parsing will work as normal (without validation).

Returns:
XmlParser should be aware of schema errors

setValidatingSchema

void setValidatingSchema(boolean validatingSchema)
Deprecated. 
Sets if XmlParser implementation should be aware of schema errors on reading Xml documents.
Not all SAX parser implementations are able to do schema validation. If SAX parser does not support schema validation a warning is shown but parsing will work as normal (without validation).

Parameters:
validatingSchema - XmlParser should be aware of schema errors

addProgressListener

void addProgressListener(ProgressListener listener)
Deprecated. 
Adds a ProgressListener instance to the notify list

Parameters:
listener - ProgressListener to add
Since:
0.0.7

removeProgressListener

void removeProgressListener(ProgressListener listener)
Deprecated. 
Removes a ProgressListener instance from the notify list

Parameters:
listener - ProgressListener to remove
Since:
0.0.7


Copyright © 2010. All Rights Reserved.