Package eu.clarin.sru.client
Class XmlStreamReaderUtils
- java.lang.Object
-
- eu.clarin.sru.client.XmlStreamReaderUtils
-
public final class XmlStreamReaderUtils extends Object
Helper class for dealing withXMLStreamReader
.Note: this class is semi-public API and may be change or removed in the future.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
consumeStart(XMLStreamReader reader)
static void
consumeWhitespace(XMLStreamReader reader)
static Document
parseToDocument(XMLStreamReader reader)
static boolean
peekEnd(XMLStreamReader reader, String namespaceURI, String localName)
static boolean
peekStart(XMLStreamReader reader, String namespaceURI, String localName)
static String
readAttributeValue(XMLStreamReader reader, String namespaceURI, String localName)
static String
readAttributeValue(XMLStreamReader reader, String namespaceURI, String localName, boolean required)
static String
readContent(XMLStreamReader reader, String namespaceURI, String localName, boolean required)
static int
readContent(XMLStreamReader reader, String namespaceURI, String localName, boolean required, int defaultValue)
static void
readEnd(XMLStreamReader reader, String namespaceURI, String localName)
static void
readEnd(XMLStreamReader reader, String namespaceURI, String localName, boolean skipContent)
static String
readNamespaceURI(XMLStreamReader reader)
static boolean
readStart(XMLStreamReader reader, String namespaceURI, String localName, boolean required)
static boolean
readStart(XMLStreamReader reader, String namespaceURI, String localName, boolean required, boolean attributes)
static String
readString(XMLStreamReader reader, boolean required)
static void
skipTag(XMLStreamReader reader, String namespaceURI, String localName)
static void
skipTag(XMLStreamReader reader, String namespaceURI, String localName, boolean required)
-
-
-
Method Detail
-
readStart
public static boolean readStart(XMLStreamReader reader, String namespaceURI, String localName, boolean required) throws XMLStreamException
- Throws:
XMLStreamException
-
readStart
public static boolean readStart(XMLStreamReader reader, String namespaceURI, String localName, boolean required, boolean attributes) throws XMLStreamException
- Throws:
XMLStreamException
-
readEnd
public static void readEnd(XMLStreamReader reader, String namespaceURI, String localName) throws XMLStreamException
- Throws:
XMLStreamException
-
readEnd
public static void readEnd(XMLStreamReader reader, String namespaceURI, String localName, boolean skipContent) throws XMLStreamException
- Throws:
XMLStreamException
-
readContent
public static String readContent(XMLStreamReader reader, String namespaceURI, String localName, boolean required) throws XMLStreamException
- Throws:
XMLStreamException
-
readContent
public static int readContent(XMLStreamReader reader, String namespaceURI, String localName, boolean required, int defaultValue) throws XMLStreamException
- Throws:
XMLStreamException
-
readString
public static String readString(XMLStreamReader reader, boolean required) throws XMLStreamException
- Throws:
XMLStreamException
-
readAttributeValue
public static String readAttributeValue(XMLStreamReader reader, String namespaceURI, String localName, boolean required) throws XMLStreamException
- Throws:
XMLStreamException
-
readAttributeValue
public static String readAttributeValue(XMLStreamReader reader, String namespaceURI, String localName) throws XMLStreamException
- Throws:
XMLStreamException
-
readNamespaceURI
public static String readNamespaceURI(XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
peekStart
public static boolean peekStart(XMLStreamReader reader, String namespaceURI, String localName) throws XMLStreamException
- Throws:
XMLStreamException
-
peekEnd
public static boolean peekEnd(XMLStreamReader reader, String namespaceURI, String localName) throws XMLStreamException
- Throws:
XMLStreamException
-
skipTag
public static void skipTag(XMLStreamReader reader, String namespaceURI, String localName, boolean required) throws XMLStreamException
- Throws:
XMLStreamException
-
skipTag
public static void skipTag(XMLStreamReader reader, String namespaceURI, String localName) throws XMLStreamException
- Throws:
XMLStreamException
-
consumeStart
public static void consumeStart(XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
consumeWhitespace
public static void consumeWhitespace(XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
parseToDocument
public static Document parseToDocument(XMLStreamReader reader) throws XMLStreamException
- Throws:
XMLStreamException
-
-