Package org.apache.karaf.util.xml
Class IndentingXMLEventWriter
- java.lang.Object
-
- org.apache.karaf.util.xml.IndentingXMLEventWriter
-
- All Implemented Interfaces:
XMLEventConsumer,XMLEventWriter
public class IndentingXMLEventWriter extends Object implements XMLEventWriter
-
-
Constructor Summary
Constructors Constructor Description IndentingXMLEventWriter(XMLEventWriter wrappedWriter, String indentation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(XMLEvent event)voidadd(XMLEventReader reader)voidclose()voidflush()NamespaceContextgetNamespaceContext()StringgetPrefix(String uri)voidsetDefaultNamespace(String uri)voidsetIndentationString(String indentationString)voidsetNamespaceContext(NamespaceContext context)voidsetPrefix(String prefix, String uri)
-
-
-
Constructor Detail
-
IndentingXMLEventWriter
public IndentingXMLEventWriter(XMLEventWriter wrappedWriter, String indentation)
- Parameters:
wrappedWriter-indentation-
-
-
Method Detail
-
close
public void close() throws XMLStreamException- Specified by:
closein interfaceXMLEventWriter- Throws:
XMLStreamException
-
add
public void add(XMLEvent event) throws XMLStreamException
- Specified by:
addin interfaceXMLEventConsumer- Specified by:
addin interfaceXMLEventWriter- Throws:
XMLStreamException
-
add
public void add(XMLEventReader reader) throws XMLStreamException
- Specified by:
addin interfaceXMLEventWriter- Throws:
XMLStreamException
-
getPrefix
public String getPrefix(String uri) throws XMLStreamException
- Specified by:
getPrefixin interfaceXMLEventWriter- Throws:
XMLStreamException
-
setPrefix
public void setPrefix(String prefix, String uri) throws XMLStreamException
- Specified by:
setPrefixin interfaceXMLEventWriter- Throws:
XMLStreamException
-
setDefaultNamespace
public void setDefaultNamespace(String uri) throws XMLStreamException
- Specified by:
setDefaultNamespacein interfaceXMLEventWriter- Throws:
XMLStreamException
-
setNamespaceContext
public void setNamespaceContext(NamespaceContext context) throws XMLStreamException
- Specified by:
setNamespaceContextin interfaceXMLEventWriter- Throws:
XMLStreamException
-
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContextin interfaceXMLEventWriter
-
flush
public void flush() throws XMLStreamException- Specified by:
flushin interfaceXMLEventWriter- Throws:
XMLStreamException
-
setIndentationString
public void setIndentationString(String indentationString)
-
-