Package com.sun.xml.ws.streaming
Class XMLStreamReaderUtil
- java.lang.Object
-
- com.sun.xml.ws.streaming.XMLStreamReaderUtil
-
public class XMLStreamReaderUtil extends Object
XMLStreamReaderUtil provides some utility methods intended to be used in conjunction with a StAX XMLStreamReader.
- Author:
- WS Development Team
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XMLStreamReaderUtil.AttributesImpl
AttributesImpl class copied from old StAXReader.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(XMLStreamReader reader)
static String
currentWhiteSpaceContent(XMLStreamReader reader)
Read spaces from the reader as long as to the next element, starting from current position.static Attributes
getAttributes(XMLStreamReader reader)
Read all attributes into an data structure.static QName
getElementQName(XMLStreamReader reader)
static String
getElementText(XMLStreamReader reader)
static String
getStateName(int state)
static String
getStateName(XMLStreamReader reader)
static int
next(XMLStreamReader reader)
static int
nextContent(XMLStreamReader reader)
static int
nextElementContent(XMLStreamReader reader)
static String
nextWhiteSpaceContent(XMLStreamReader reader)
Moves next and read spaces from the reader as long as to the next element.static void
readRest(XMLStreamReader reader)
static void
skipElement(XMLStreamReader reader)
Skip current element, leaving the cursor at END_ELEMENT of current element.static void
skipSiblings(XMLStreamReader reader, QName parent)
Skip following siblings, leaving cursor at END_ELEMENT of parent element.static void
toNextTag(XMLStreamReader reader, QName name)
static void
verifyReaderState(XMLStreamReader reader, int expectedState)
static void
verifyTag(XMLStreamReader reader, String namespaceURI, String localName)
static void
verifyTag(XMLStreamReader reader, QName name)
-
-
-
Method Detail
-
close
public static void close(XMLStreamReader reader)
-
readRest
public static void readRest(XMLStreamReader reader)
-
next
public static int next(XMLStreamReader reader)
-
nextElementContent
public static int nextElementContent(XMLStreamReader reader)
-
toNextTag
public static void toNextTag(XMLStreamReader reader, QName name)
-
nextWhiteSpaceContent
public static String nextWhiteSpaceContent(XMLStreamReader reader)
Moves next and read spaces from the reader as long as to the next element. Comments are ignored- Parameters:
reader
-- Returns:
-
currentWhiteSpaceContent
public static String currentWhiteSpaceContent(XMLStreamReader reader)
Read spaces from the reader as long as to the next element, starting from current position. Comments are ignored.- Parameters:
reader
-- Returns:
-
nextContent
public static int nextContent(XMLStreamReader reader)
-
skipElement
public static void skipElement(XMLStreamReader reader)
Skip current element, leaving the cursor at END_ELEMENT of current element.
-
skipSiblings
public static void skipSiblings(XMLStreamReader reader, QName parent)
Skip following siblings, leaving cursor at END_ELEMENT of parent element.
-
getElementText
public static String getElementText(XMLStreamReader reader)
-
getElementQName
public static QName getElementQName(XMLStreamReader reader)
-
getAttributes
public static Attributes getAttributes(XMLStreamReader reader)
Read all attributes into an data structure. Note that this method cannot be called multiple times to get the same list of attributes.
-
verifyReaderState
public static void verifyReaderState(XMLStreamReader reader, int expectedState)
-
verifyTag
public static void verifyTag(XMLStreamReader reader, String namespaceURI, String localName)
-
verifyTag
public static void verifyTag(XMLStreamReader reader, QName name)
-
getStateName
public static String getStateName(XMLStreamReader reader)
-
getStateName
public static String getStateName(int state)
-
-