Files
rr3-apk/decompiled/sources/com/mbridge/msdk/playercommon/exoplayer2/util/XmlPullParserUtil.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

56 lines
2.1 KiB
Java

package com.mbridge.msdk.playercommon.exoplayer2.util;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* loaded from: classes4.dex */
public final class XmlPullParserUtil {
private XmlPullParserUtil() {
}
public static boolean isEndTag(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
return isEndTag(xmlPullParser) && xmlPullParser.getName().equals(str);
}
public static boolean isEndTag(XmlPullParser xmlPullParser) throws XmlPullParserException {
return xmlPullParser.getEventType() == 3;
}
public static boolean isStartTag(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
return isStartTag(xmlPullParser) && xmlPullParser.getName().equals(str);
}
public static boolean isStartTag(XmlPullParser xmlPullParser) throws XmlPullParserException {
return xmlPullParser.getEventType() == 2;
}
public static boolean isStartTagIgnorePrefix(XmlPullParser xmlPullParser, String str) throws XmlPullParserException {
return isStartTag(xmlPullParser) && stripPrefix(xmlPullParser.getName()).equals(str);
}
public static String getAttributeValue(XmlPullParser xmlPullParser, String str) {
int attributeCount = xmlPullParser.getAttributeCount();
for (int i = 0; i < attributeCount; i++) {
if (xmlPullParser.getAttributeName(i).equals(str)) {
return xmlPullParser.getAttributeValue(i);
}
}
return null;
}
public static String getAttributeValueIgnorePrefix(XmlPullParser xmlPullParser, String str) {
int attributeCount = xmlPullParser.getAttributeCount();
for (int i = 0; i < attributeCount; i++) {
if (stripPrefix(xmlPullParser.getAttributeName(i)).equals(str)) {
return xmlPullParser.getAttributeValue(i);
}
}
return null;
}
private static String stripPrefix(String str) {
int indexOf = str.indexOf(58);
return indexOf == -1 ? str : str.substring(indexOf + 1);
}
}