|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.xml.MCRParserXerces
public class MCRParserXerces
Implements the MCRParserInterface using the Xerces XML to parse XML streams to a DOM document.
| Field Summary | |
|---|---|
(package private) SAXBuilder |
builder
A xerces parser instance that will not validate |
(package private) SAXBuilder |
builderValid
A xerces parser instance that will validate |
| Constructor Summary | |
|---|---|
MCRParserXerces()
Constructor for the Xerces parser. |
|
| Method Summary | |
|---|---|
void |
error(SAXParseException ex)
Handles parse errors |
void |
fatalError(SAXParseException ex)
Handles fatal parse errors |
Document |
parseURI(URI uri)
Parses the XML byte stream with xerces parser and returns a DOM document. |
Document |
parseURI(URI uri,
boolean validate)
Parses the XML byte stream with xerces parser and returns a DOM document. |
Document |
parseXML(byte[] xml)
Parses the XML byte stream with xerces parser and returns a DOM document. |
Document |
parseXML(byte[] xml,
boolean validate)
Parses the XML byte stream with xerces parser and returns a DOM document. |
Document |
parseXML(InputStream input)
Parses an Byte Array and returns it as DOM. |
Document |
parseXML(InputStream input,
boolean validate)
Parses an Byte Array and returns it as DOM. |
Document |
parseXML(String xml)
Parses the XML byte stream with xerces parser and returns a DOM document. |
Document |
parseXML(String xml,
boolean validate)
Parses the XML byte stream with xerces parser and returns a DOM document. |
void |
warning(SAXParseException ex)
Handles parser warnings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
SAXBuilder builderValid
SAXBuilder builder
| Constructor Detail |
|---|
public MCRParserXerces()
| Method Detail |
|---|
public Document parseURI(URI uri)
parseURI in interface MCRParserInterfaceuri - the URI of the XML input stream
MCRException - if XML could not be parsed
public Document parseURI(URI uri,
boolean validate)
parseURI in interface MCRParserInterfaceuri - the URI of the XML input streamvalidate - if true, will validate against XML Schema
MCRException - if XML could not be parsed
IOException
SAXExceptionpublic Document parseXML(String xml)
parseXML in interface MCRParserInterfacexml - the XML byte stream
MCRException - if XML could not be parsed
public Document parseXML(String xml,
boolean validate)
parseXML in interface MCRParserInterfacexml - the XML byte streamvalidate - if true, will validate against XML Schema
MCRException - if XML could not be parsedpublic Document parseXML(byte[] xml)
parseXML in interface MCRParserInterfacexml - the XML byte stream
MCRException - if XML could not be parsed
public Document parseXML(byte[] xml,
boolean validate)
parseXML in interface MCRParserInterfacexml - the XML byte streamvalidate - if true, will validate against XML Schema
MCRException - if XML could not be parsed
public Document parseXML(InputStream input)
throws MCRException
MCRParserInterface
parseXML in interface MCRParserInterfaceinput - the InputStream to be parsed
MCRException - if XML could not be parsed
public Document parseXML(InputStream input,
boolean validate)
throws MCRException
MCRParserInterface
parseXML in interface MCRParserInterfaceinput - the InputStream to be parsedvalidate - the validation flag
MCRException - if XML could not be parsedpublic void warning(SAXParseException ex)
warning in interface ErrorHandlerpublic void error(SAXParseException ex)
error in interface ErrorHandlerpublic void fatalError(SAXParseException ex)
fatalError in interface ErrorHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||