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 classXMLStreamReaderUtil.AttributesImplAttributesImpl class copied from old StAXReader.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(XMLStreamReader reader)static StringcurrentWhiteSpaceContent(XMLStreamReader reader)Read spaces from the reader as long as to the next element, starting from current position.static AttributesgetAttributes(XMLStreamReader reader)Read all attributes into an data structure.static QNamegetElementQName(XMLStreamReader reader)static StringgetElementText(XMLStreamReader reader)static StringgetStateName(int state)static StringgetStateName(XMLStreamReader reader)static intnext(XMLStreamReader reader)static intnextContent(XMLStreamReader reader)static intnextElementContent(XMLStreamReader reader)static StringnextWhiteSpaceContent(XMLStreamReader reader)Moves next and read spaces from the reader as long as to the next element.static voidreadRest(XMLStreamReader reader)static voidskipElement(XMLStreamReader reader)Skip current element, leaving the cursor at END_ELEMENT of current element.static voidskipSiblings(XMLStreamReader reader, QName parent)Skip following siblings, leaving cursor at END_ELEMENT of parent element.static voidtoNextTag(XMLStreamReader reader, QName name)static voidverifyReaderState(XMLStreamReader reader, int expectedState)static voidverifyTag(XMLStreamReader reader, String namespaceURI, String localName)static voidverifyTag(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)
-
-