public class Xml extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Xml.Encoding
Supported character encodings.
|
Modifier and Type | Field and Description |
---|---|
static String |
FEATURE_RELAXED
XmlPullParser "relaxed" feature name. |
Constructor and Description |
---|
Xml() |
Modifier and Type | Method and Description |
---|---|
static AttributeSet |
asAttributeSet(XmlPullParser parser)
Return an AttributeSet interface for use with the given XmlPullParser.
|
static Xml.Encoding |
findEncodingByName(String encodingName)
Finds an encoding by name.
|
static XmlPullParser |
newPullParser()
Returns a new pull parser with namespace support.
|
static XmlSerializer |
newSerializer()
Creates a new xml serializer.
|
static void |
parse(InputStream in,
Xml.Encoding encoding,
ContentHandler contentHandler)
Parses xml from the given input stream and fires events on the given SAX
handler.
|
static void |
parse(Reader in,
ContentHandler contentHandler)
Parses xml from the given reader and fires events on the given SAX
handler.
|
static void |
parse(String xml,
ContentHandler contentHandler)
Parses the given xml string and fires events on the given SAX handler.
|
public static String FEATURE_RELAXED
XmlPullParser
"relaxed" feature name.public static void parse(String xml, ContentHandler contentHandler) throws SAXException
SAXException
public static void parse(Reader in, ContentHandler contentHandler) throws IOException, SAXException
IOException
SAXException
public static void parse(InputStream in, Xml.Encoding encoding, ContentHandler contentHandler) throws IOException, SAXException
IOException
SAXException
public static XmlPullParser newPullParser()
public static XmlSerializer newSerializer()
public static Xml.Encoding findEncodingByName(String encodingName) throws UnsupportedEncodingException
null
.UnsupportedEncodingException
public static AttributeSet asAttributeSet(XmlPullParser parser)
parser
- The existing parser for which you would like an
AttributeSet.AttributeSet