Package android.util

Class Xml


  • public class Xml
    extends Object
    XML utility methods.
    • Constructor Detail

      • Xml

        public Xml()
    • Method Detail

      • newPullParser

        public static XmlPullParser newPullParser()
        Returns a new pull parser with namespace support.
      • newSerializer

        public static XmlSerializer newSerializer()
        Creates a new xml serializer.
      • asAttributeSet

        public static AttributeSet asAttributeSet​(XmlPullParser parser)
        Return an AttributeSet interface for use with the given XmlPullParser. If the given parser itself implements AttributeSet, that implementation is simply returned. Otherwise a wrapper class is instantiated on top of the XmlPullParser, as a proxy for retrieving its attributes, and returned to you.
        Parameters:
        parser - The existing parser for which you would like an AttributeSet.
        Returns:
        An AttributeSet you can use to retrieve the attribute values at each of the tags as the parser moves through its XML document.
        See Also:
        AttributeSet