IXmlPullParser.NextTag Method

Definition

Call next() and return event if it is START_TAG or END_TAG otherwise throw an exception.

[Android.Runtime.Register("nextTag", "()I", "GetNextTagHandler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Org.XmlPull.V1.XmlPullParserNode NextTag ();
[<Android.Runtime.Register("nextTag", "()I", "GetNextTagHandler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member NextTag : unit -> Org.XmlPull.V1.XmlPullParserNode

Returns

Attributes

Exceptions

Remarks

Call next() and return event if it is START_TAG or END_TAG otherwise throw an exception. It will skip whitespace TEXT before actual tag if any.

essentially it does this

int eventType = next();
              if(eventType == TEXT &amp;&amp;  isWhitespace()) {   // skip whitespace
                 eventType = next();
              }
              if (eventType != START_TAG &amp;&amp;  eventType != END_TAG) {
                 throw new XmlPullParserException("expected start or end tag", this, null);
              }
              return eventType;

Java documentation for org.xmlpull.v1.XmlPullParser.nextTag().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to