Class DefaultXmlEventReaderFactory
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.DefaultXmlEventReaderFactory
-
- All Implemented Interfaces:
XmlEventReaderFactory
public class DefaultXmlEventReaderFactory extends Object implements XmlEventReaderFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultXmlEventReaderFactory()
This is a convenience constructor used in testing.DefaultXmlEventReaderFactory(XMLEntityResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLEventReader
createEditorXmlEventReader(Reader xml)
XMLEventReader
createStorageXmlEventReader(Reader xml)
XMLEventReader
createStorageXmlEventReader(Reader xml, boolean entityReplacing)
This method is experimental and may change at very short notice.XMLEventReader
createXmlEventReader(Reader xml)
XMLEventReader
createXMLEventReader(Reader xml, List<Namespace> namespaces, boolean entityReplacing)
A factory method providing more detailed control over the XMLEventReader you require.XMLEventReader
createXmlFragmentBodyEventReader(XMLEventReader delegate)
XMLEventReader
createXmlFragmentEventReader(Reader xml)
Create a fragment event reader which excludes the start and end document events.XMLEventReader
createXmlFragmentEventReader(XMLEventReader delegate)
-
-
-
Constructor Detail
-
DefaultXmlEventReaderFactory
public DefaultXmlEventReaderFactory()
This is a convenience constructor used in testing. It will instantiate a new XhtmlEntityResolver implicitly rather than require one to be wired via Spring.
-
DefaultXmlEventReaderFactory
public DefaultXmlEventReaderFactory(XMLEntityResolver resolver)
-
-
Method Detail
-
createXmlEventReader
public XMLEventReader createXmlEventReader(Reader xml) throws XMLStreamException
- Specified by:
createXmlEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createXmlFragmentEventReader
public XMLEventReader createXmlFragmentEventReader(Reader xml) throws XMLStreamException
Description copied from interface:XmlEventReaderFactory
Create a fragment event reader which excludes the start and end document events.- Specified by:
createXmlFragmentEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createStorageXmlEventReader
public XMLEventReader createStorageXmlEventReader(Reader xml) throws XMLStreamException
- Specified by:
createStorageXmlEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createStorageXmlEventReader
public XMLEventReader createStorageXmlEventReader(Reader xml, boolean entityReplacing) throws XMLStreamException
Description copied from interface:XmlEventReaderFactory
This method is experimental and may change at very short notice.- Specified by:
createStorageXmlEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createEditorXmlEventReader
public XMLEventReader createEditorXmlEventReader(Reader xml) throws XMLStreamException
- Specified by:
createEditorXmlEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createXMLEventReader
public XMLEventReader createXMLEventReader(Reader xml, List<Namespace> namespaces, boolean entityReplacing) throws XMLStreamException
Description copied from interface:XmlEventReaderFactory
A factory method providing more detailed control over the XMLEventReader you require.- Specified by:
createXMLEventReader
in interfaceXmlEventReaderFactory
- Parameters:
xml
- the XML formatted data to be readnamespaces
- a List of namespaces to be found within the supplied XML dataentityReplacing
- a flag indicating whether entities found within the XML data should be replaced with characters, or left as entities.- Returns:
- the required XMLEventReader.
- Throws:
XMLStreamException
-
createXmlFragmentEventReader
public XMLEventReader createXmlFragmentEventReader(XMLEventReader delegate) throws XMLStreamException
- Specified by:
createXmlFragmentEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
createXmlFragmentBodyEventReader
public XMLEventReader createXmlFragmentBodyEventReader(XMLEventReader delegate) throws XMLStreamException
- Specified by:
createXmlFragmentBodyEventReader
in interfaceXmlEventReaderFactory
- Throws:
XMLStreamException
-
-