Java XMLStreamReader skip(XMLStreamReader parser)

Here you can find the source of skip(XMLStreamReader parser)

Description

skip

License

Open Source License

Declaration

static protected void skip(XMLStreamReader parser) throws XMLStreamException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

public class Main {
    static protected void skip(XMLStreamReader parser) throws XMLStreamException {
        while (parser.hasNext()) {
            int eventType = parser.next();
            if (eventType == XMLStreamConstants.START_ELEMENT) {
                skip(parser);//w w w  .  j  av  a 2s  . c o  m
            } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                return;
            }
        }
    }
}

Related

  1. printText(XMLStreamReader xmlr)
  2. readEndTag(XMLStreamReader reader, String localName)
  3. readEvent(XMLStreamReader reader)
  4. readTextWithNodes(XMLStreamReader xsr, Map nodeIdToOffsetMap)
  5. skip(XMLStreamReader parser)
  6. skipEventsTo(int targetEvent, XMLStreamReader parser)
  7. skipNewLines(XMLStreamReader xmlStreamReader)
  8. toReadableEvent(XMLStreamReader r)
  9. write(XMLStreamReader xmlr, XMLStreamWriter writer)