bbc.rd.tvanytime.xml
Interface XMLParser

All Known Implementing Classes:
SAXXMLParser

public interface XMLParser

XMLParser: Interface for TVAnytime XML parsers.

Version:
1.0
Author:
Tristan Ferne, BBC Research & Development, April 2002

Method Summary
 void parse(java.io.File f)
          Parse the content of the file specified as TVAnytime XML.
 void parse(org.xml.sax.InputSource is)
          Parse the content of the given InputSource as TVAnytime XML.
 void parse(java.io.InputStream is)
          Parse the content of the given InputStream as TVAnytime XML.
 void parse(java.lang.String uri)
          Parse the content described by the given Universal Resource Identifier (URI).
 void setValidating(boolean validating)
          Sets whether the parser should validate the XML.
 

Method Detail

parse

void parse(org.xml.sax.InputSource is)
           throws java.io.IOException,
                  TVAnytimeException,
                  NonFatalXMLException
Parse the content of the given InputSource as TVAnytime XML.

Parameters:
is - The InputSource containing the content to be parsed.
Throws:
java.io.IOException - If any IO errors occur.
TVAnytimeException - If the underlying parser throws an error while parsing.
NonFatalXMLException - If the underlying parser throws a non-fatal error while parsing.

parse

void parse(java.io.File f)
           throws java.io.IOException,
                  TVAnytimeException,
                  NonFatalXMLException
Parse the content of the file specified as TVAnytime XML.

Parameters:
f - File containing the TVAnytime XML.
Throws:
java.io.IOException - If any IO errors occur.
TVAnytimeException - If the underlying parser throws an error while parsing.
NonFatalXMLException - If the underlying parser throws a non-fatal error while parsing.

parse

void parse(java.io.InputStream is)
           throws java.io.IOException,
                  TVAnytimeException
Parse the content of the given InputStream as TVAnytime XML.

Parameters:
is - The InputStream containing the content to be parsed.
Throws:
java.io.IOException - If any IO errors occur.
TVAnytimeException - If the underlying parser throws an error while parsing.

parse

void parse(java.lang.String uri)
           throws java.io.IOException,
                  TVAnytimeException
Parse the content described by the given Universal Resource Identifier (URI).

Parameters:
uri - The location of the content to be parsed.
Throws:
java.io.IOException - If any IO errors occur.
TVAnytimeException - If the underlying parser throws an error while parsing.

setValidating

void setValidating(boolean validating)
                   throws TVAnytimeException
Sets whether the parser should validate the XML.

Parameters:
validating - Whether the parser should validate.
Throws:
TVAnytimeException - if couldn't set property.