Package com.sun.xml.ws.util.xml
Class XMLReaderComposite
- java.lang.Object
-
- com.sun.xml.ws.util.xml.XMLReaderComposite
-
- All Implemented Interfaces:
XMLStreamConstants,XMLStreamReader,XMLStreamReaderEx
public class XMLReaderComposite extends Object implements XMLStreamReaderEx
XMLReaderComposite- Author:
- shih-chang.chen@oracle.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXMLReaderComposite.ElemInfostatic classXMLReaderComposite.State
-
Field Summary
Fields Modifier and Type Field Description protected XMLStreamReader[]childrenprotected XMLReaderComposite.ElemInfoelemInfoprotected intpayloadIndexprotected XMLStreamReaderpayloadReaderprotected XMLReaderComposite.Statestateprotected TagInfosettagInfo-
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description XMLReaderComposite(XMLReaderComposite.ElemInfo elem, XMLStreamReader[] wrapees)
-
Method Summary
-
-
-
Field Detail
-
state
protected XMLReaderComposite.State state
-
elemInfo
protected XMLReaderComposite.ElemInfo elemInfo
-
tagInfo
protected TagInfoset tagInfo
-
children
protected XMLStreamReader[] children
-
payloadIndex
protected int payloadIndex
-
payloadReader
protected XMLStreamReader payloadReader
-
-
Constructor Detail
-
XMLReaderComposite
public XMLReaderComposite(XMLReaderComposite.ElemInfo elem, XMLStreamReader[] wrapees)
-
-
Method Detail
-
next
public int next() throws XMLStreamException- Specified by:
nextin interfaceXMLStreamReader- Throws:
XMLStreamException
-
hasNext
public boolean hasNext() throws XMLStreamException- Specified by:
hasNextin interfaceXMLStreamReader- Throws:
XMLStreamException
-
getElementText
public String getElementText() throws XMLStreamException
- Specified by:
getElementTextin interfaceXMLStreamReader- Throws:
XMLStreamException
-
nextTag
public int nextTag() throws XMLStreamException- Specified by:
nextTagin interfaceXMLStreamReader- Throws:
XMLStreamException
-
getProperty
public Object getProperty(String name) throws IllegalArgumentException
- Specified by:
getPropertyin interfaceXMLStreamReader- Throws:
IllegalArgumentException
-
require
public void require(int type, String namespaceURI, String localName) throws XMLStreamException- Specified by:
requirein interfaceXMLStreamReader- Throws:
XMLStreamException
-
close
public void close() throws XMLStreamException- Specified by:
closein interfaceXMLStreamReader- Throws:
XMLStreamException
-
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURIin interfaceXMLStreamReader
-
isStartElement
public boolean isStartElement()
- Specified by:
isStartElementin interfaceXMLStreamReader
-
isEndElement
public boolean isEndElement()
- Specified by:
isEndElementin interfaceXMLStreamReader
-
isCharacters
public boolean isCharacters()
- Specified by:
isCharactersin interfaceXMLStreamReader
-
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpacein interfaceXMLStreamReader
-
getAttributeValue
public String getAttributeValue(String uri, String localName)
- Specified by:
getAttributeValuein interfaceXMLStreamReader
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCountin interfaceXMLStreamReader
-
getAttributeName
public QName getAttributeName(int i)
- Specified by:
getAttributeNamein interfaceXMLStreamReader
-
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespacein interfaceXMLStreamReader
-
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalNamein interfaceXMLStreamReader
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefixin interfaceXMLStreamReader
-
getAttributeType
public String getAttributeType(int index)
- Specified by:
getAttributeTypein interfaceXMLStreamReader
-
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValuein interfaceXMLStreamReader
-
isAttributeSpecified
public boolean isAttributeSpecified(int index)
- Specified by:
isAttributeSpecifiedin interfaceXMLStreamReader
-
getNamespaceCount
public int getNamespaceCount()
- Specified by:
getNamespaceCountin interfaceXMLStreamReader
-
getNamespacePrefix
public String getNamespacePrefix(int index)
- Specified by:
getNamespacePrefixin interfaceXMLStreamReader
-
getNamespaceURI
public String getNamespaceURI(int index)
- Specified by:
getNamespaceURIin interfaceXMLStreamReader
-
getNamespaceContext
public NamespaceContextEx getNamespaceContext()
Description copied from interface:XMLStreamReaderEx- Specified by:
getNamespaceContextin interfaceXMLStreamReader- Specified by:
getNamespaceContextin interfaceXMLStreamReaderEx
-
getEventType
public int getEventType()
- Specified by:
getEventTypein interfaceXMLStreamReader
-
getText
public String getText()
- Specified by:
getTextin interfaceXMLStreamReader
-
getTextCharacters
public char[] getTextCharacters()
- Specified by:
getTextCharactersin interfaceXMLStreamReader
-
getTextCharacters
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException- Specified by:
getTextCharactersin interfaceXMLStreamReader- Throws:
XMLStreamException
-
getTextStart
public int getTextStart()
- Specified by:
getTextStartin interfaceXMLStreamReader
-
getTextLength
public int getTextLength()
- Specified by:
getTextLengthin interfaceXMLStreamReader
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceXMLStreamReader
-
hasText
public boolean hasText()
- Specified by:
hasTextin interfaceXMLStreamReader
-
getLocation
public Location getLocation()
- Specified by:
getLocationin interfaceXMLStreamReader
-
getName
public QName getName()
- Specified by:
getNamein interfaceXMLStreamReader
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfaceXMLStreamReader
-
hasName
public boolean hasName()
- Specified by:
hasNamein interfaceXMLStreamReader
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceXMLStreamReader
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceXMLStreamReader
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceXMLStreamReader
-
isStandalone
public boolean isStandalone()
- Specified by:
isStandalonein interfaceXMLStreamReader
-
standaloneSet
public boolean standaloneSet()
- Specified by:
standaloneSetin interfaceXMLStreamReader
-
getCharacterEncodingScheme
public String getCharacterEncodingScheme()
- Specified by:
getCharacterEncodingSchemein interfaceXMLStreamReader
-
getPITarget
public String getPITarget()
- Specified by:
getPITargetin interfaceXMLStreamReader
-
getPIData
public String getPIData()
- Specified by:
getPIDatain interfaceXMLStreamReader
-
getElementTextTrim
public String getElementTextTrim() throws XMLStreamException
Description copied from interface:XMLStreamReaderExWorks likeXMLStreamReader.getElementText()but trims the leading and trailing whitespace.The parser can often do this more efficiently than
getElementText().trim().- Specified by:
getElementTextTrimin interfaceXMLStreamReaderEx- Throws:
XMLStreamException- See Also:
XMLStreamReader.getElementText()
-
getPCDATA
public CharSequence getPCDATA() throws XMLStreamException
Description copied from interface:XMLStreamReaderExWorks likeXMLStreamReader.getText()but hides the actual data representation.- Specified by:
getPCDATAin interfaceXMLStreamReaderEx- Returns:
- The
CharSequencethat represents the character infoset items at the current position.The
CharSequenceis normally aString, but can be any otherCharSequenceimplementation. For binary data, however, use ofBase64Datais recommended (so that the consumer interested in seeing it as binary data may take advantage of mor efficient data representation.)The object returned from this method belongs to the parser, and its content is guaranteed to be the same only until the
XMLStreamReader.next()method is invoked. - Throws:
XMLStreamException
-
-