Here you can find the source of matches(XmlPullParser pp, int type, String namespace, String name)
public static boolean matches(XmlPullParser pp, int type, String namespace, String name) throws XmlPullParserException
//package com.java2s; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { /**/*from ww w . j av a 2 s.com*/ * Tests if the current event is of the given type and if the namespace and name match. * null will match any namespace and any name. If the test passes a true is returned * otherwise a false is returned. */ public static boolean matches(XmlPullParser pp, int type, String namespace, String name) throws XmlPullParserException { boolean matches = type == pp.getEventType() && (namespace == null || namespace .equals(pp.getNamespace())) && (name == null || name.equals(pp.getName())); return matches; } }