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
  • Method Details

    • 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
    • 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.
    • 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)