Package eu.clarin.weblicht.wlfxb.io
Class XmlReaderWriter
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.io.XmlReaderWriter
-
public class XmlReaderWriter extends Object
Class XmlReaderWriter helps to work with TCF XML underlying streams. Should not be used directly.- Author:
- Yana Panchenko
-
-
Field Summary
Fields Modifier and Type Field Description static String
NEW_LINE
static String
XML_WL1_MODEL_PI_NAME
-
Constructor Summary
Constructors Constructor Description XmlReaderWriter(XMLEventReader xmlEventReader, XMLEventWriter xmlEventWriter)
-
Method Summary
Modifier and Type Method Description void
add(XMLEvent xmlEvent)
void
close()
void
endExternalFragment(int decIndent)
XMLEvent
readEvent()
void
readWriteElement(String tagName)
void
readWriteToTheEnd()
void
readWriteUpToEndElement(String endTag)
void
readWriteUpToStartElement(String startTag)
void
setOutputAsXmlFragment(boolean outputAsXmlFragment)
void
startExternalFragment(int incIndent)
-
-
-
Field Detail
-
XML_WL1_MODEL_PI_NAME
public static final String XML_WL1_MODEL_PI_NAME
- See Also:
- Constant Field Values
-
NEW_LINE
public static final String NEW_LINE
-
-
Constructor Detail
-
XmlReaderWriter
public XmlReaderWriter(XMLEventReader xmlEventReader, XMLEventWriter xmlEventWriter)
-
-
Method Detail
-
setOutputAsXmlFragment
public void setOutputAsXmlFragment(boolean outputAsXmlFragment)
-
readEvent
public XMLEvent readEvent() throws WLFormatException
- Throws:
WLFormatException
-
startExternalFragment
public void startExternalFragment(int incIndent) throws XMLStreamException
- Throws:
XMLStreamException
-
endExternalFragment
public void endExternalFragment(int decIndent) throws XMLStreamException
- Throws:
XMLStreamException
-
add
public void add(XMLEvent xmlEvent) throws XMLStreamException
- Throws:
XMLStreamException
-
close
public void close() throws WLFormatException
- Throws:
WLFormatException
-
readWriteToTheEnd
public void readWriteToTheEnd() throws WLFormatException
- Throws:
WLFormatException
-
readWriteElement
public void readWriteElement(String tagName) throws WLFormatException
- Throws:
WLFormatException
-
readWriteUpToStartElement
public void readWriteUpToStartElement(String startTag) throws XMLStreamException
- Throws:
XMLStreamException
-
readWriteUpToEndElement
public void readWriteUpToEndElement(String endTag) throws XMLStreamException
- Throws:
XMLStreamException
-
-