Package org.apache.camel.component.stax
Class StaxStreamXMLReader
- java.lang.Object
-
- org.apache.camel.component.stax.StaxStreamXMLReader
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidendPrefixMapping(String prefix)Ends the prefix mapping for the given prefix.ContentHandlergetContentHandler()DTDHandlergetDTDHandler()EntityResolvergetEntityResolver()ErrorHandlergetErrorHandler()booleangetFeature(String name)protected LexicalHandlergetLexicalHandler()ObjectgetProperty(String name)Throws aSAXNotRecognizedExceptionexception when the given property does not signify a lexical handler.protected booleanhasNamespacePrefixesFeature()Indicates whether the SAX featurehttp://xml.org/sax/features/namespaces-prefixesis turned on.protected booleanhasNamespacesFeature()Indicates whether the SAX featurehttp://xml.org/sax/features/namespacesis turned on.voidparse(String ignored)Parse the StAX XML reader passed at construction-time.voidparse(InputSource ignored)Parse the StAX XML reader passed at construction-time.protected voidparseInternal()voidsetContentHandler(ContentHandler contentHandler)voidsetDTDHandler(DTDHandler dtdHandler)voidsetEntityResolver(EntityResolver entityResolver)voidsetErrorHandler(ErrorHandler errorHandler)voidsetFeature(String name, boolean value)voidsetProperty(String name, Object value)Throws aSAXNotRecognizedExceptionexception when the given property does not signify a lexical handler.protected voidsetStandalone(boolean standalone)protected voidstartPrefixMapping(String prefix, String namespace)Starts the prefix mapping for the given prefix.protected StringtoQualifiedName(QName qName)Convert aQNameto a qualified name, as used by DOM and SAX.
-
-
-
Method Detail
-
parseInternal
protected void parseInternal() throws SAXException, XMLStreamException- Throws:
SAXExceptionXMLStreamException
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setStandalone
protected void setStandalone(boolean standalone)
-
hasNamespacesFeature
protected boolean hasNamespacesFeature()
Indicates whether the SAX featurehttp://xml.org/sax/features/namespacesis turned on.
-
hasNamespacePrefixesFeature
protected boolean hasNamespacePrefixesFeature()
Indicates whether the SAX featurehttp://xml.org/sax/features/namespaces-prefixesis turned on.
-
toQualifiedName
protected String toQualifiedName(QName qName)
Convert aQNameto a qualified name, as used by DOM and SAX. The returned string has a format ofprefix:localNameif the prefix is set, or justlocalNameif not.- Parameters:
qName- theQName- Returns:
- the qualified name
-
parse
public final void parse(InputSource ignored) throws SAXException
Parse the StAX XML reader passed at construction-time.NOTE:: The given
InputSourceis not read, but ignored.- Specified by:
parsein interfaceXMLReader- Parameters:
ignored- is ignored- Throws:
SAXException- a SAX exception, possibly wrapping aXMLStreamException
-
parse
public final void parse(String ignored) throws SAXException
Parse the StAX XML reader passed at construction-time.NOTE:: The given system identifier is not read, but ignored.
- Specified by:
parsein interfaceXMLReader- Parameters:
ignored- is ignored- Throws:
SAXException- A SAX exception, possibly wrapping aXMLStreamException
-
startPrefixMapping
protected void startPrefixMapping(String prefix, String namespace) throws SAXException
Starts the prefix mapping for the given prefix.- Throws:
SAXException- See Also:
ContentHandler.startPrefixMapping(String, String)
-
endPrefixMapping
protected void endPrefixMapping(String prefix) throws SAXException
Ends the prefix mapping for the given prefix.- Throws:
SAXException- See Also:
ContentHandler.endPrefixMapping(String)
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandlerin interfaceXMLReader
-
setContentHandler
public void setContentHandler(ContentHandler contentHandler)
- Specified by:
setContentHandlerin interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler dtdHandler)
- Specified by:
setDTDHandlerin interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandlerin interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolverin interfaceXMLReader
-
setEntityResolver
public void setEntityResolver(EntityResolver entityResolver)
- Specified by:
setEntityResolverin interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandlerin interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
- Specified by:
setErrorHandlerin interfaceXMLReader
-
getLexicalHandler
protected LexicalHandler getLexicalHandler()
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
Throws aSAXNotRecognizedExceptionexception when the given property does not signify a lexical handler. The property name for a lexical handler ishttp://xml.org/sax/properties/lexical-handler.- Specified by:
getPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
Throws aSAXNotRecognizedExceptionexception when the given property does not signify a lexical handler. The property name for a lexical handler ishttp://xml.org/sax/properties/lexical-handler.- Specified by:
setPropertyin interfaceXMLReader- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
-