public static class MzxmlReader.XMLEventUtils extends Object
| Constructor and Description |
|---|
MzxmlReader.XMLEventUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getMandatoryAttribute(StartElement startElement,
String attributeName,
String... alternateNames) |
static <E extends XMLEvent> |
getMandatoryXMLEvent(com.google.common.base.Optional<E> mandatoryEvent,
String message) |
static com.google.common.base.Optional<String> |
getOptionalAttribute(StartElement startElement,
String attributeName) |
static com.google.common.base.Optional<Characters> |
nextCharacters(XMLEventReader reader) |
static com.google.common.base.Optional<StartElement> |
nextStartElementIf(XMLEventReader reader,
String tagName)
Return the next start element only if match tagName.
|
static com.google.common.base.Optional<Characters> |
seekNextCharacters(XMLEventReader reader) |
static com.google.common.base.Optional<StartElement> |
seekStartElement(XMLEventReader reader,
String tagName)
Seek to the next start tag
|
static void |
writeAllEventsUntilStartElement(XMLEventReader reader,
String tagName,
Writer writer) |
public static com.google.common.base.Optional<StartElement> seekStartElement(XMLEventReader reader, String tagName) throws XMLStreamException
reader - the xml readertagName - the start element name to returnXMLStreamExceptionpublic static com.google.common.base.Optional<StartElement> nextStartElementIf(XMLEventReader reader, String tagName) throws XMLStreamException
reader - the xml readertagName - the start element name to returnXMLStreamExceptionpublic static com.google.common.base.Optional<Characters> seekNextCharacters(XMLEventReader reader) throws XMLStreamException
XMLStreamExceptionpublic static com.google.common.base.Optional<Characters> nextCharacters(XMLEventReader reader) throws XMLStreamException
XMLStreamExceptionpublic static com.google.common.base.Optional<String> getOptionalAttribute(StartElement startElement, String attributeName)
public static String getMandatoryAttribute(StartElement startElement, String attributeName, String... alternateNames) throws XMLStreamException
XMLStreamExceptionpublic static <E extends XMLEvent> E getMandatoryXMLEvent(com.google.common.base.Optional<E> mandatoryEvent, String message) throws XMLStreamException
XMLStreamExceptionpublic static void writeAllEventsUntilStartElement(XMLEventReader reader, String tagName, Writer writer) throws XMLStreamException
XMLStreamExceptionCopyright © 2016. All Rights Reserved.