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; // for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/) import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { /**//from w ww .j a va2s . c o m * 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; } }