|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.xml.Xml
public class Xml
XML utilities.
Nested Class Summary | |
---|---|
static class |
Xml.CustomizeParser
Customizes the behavior of XML parsing. |
Method Summary | |
---|---|
static org.xmlpull.v1.XmlPullParser |
createParser()
Returns a new XML pull parser. |
static org.xmlpull.v1.XmlSerializer |
createSerializer()
Returns a new XML serializer. |
static void |
parseElement(org.xmlpull.v1.XmlPullParser parser,
Object destination,
XmlNamespaceDictionary namespaceDictionary,
Xml.CustomizeParser customizeParser)
Parses an XML element using the given XML pull parser into the given destination object. |
static String |
toStringOf(Object element)
Shows a debug string representation of an element data object of key/value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.xmlpull.v1.XmlSerializer createSerializer()
IllegalArgumentException
- if encountered an XmlPullParserException
public static org.xmlpull.v1.XmlPullParser createParser() throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
public static String toStringOf(Object element)
It will make up something for the element name and XML namespaces. If those are known, it is
better to use XmlNamespaceDictionary.toStringOf(String, Object)
.
element
- element data object of key/value pairs (GenericXml
, Map
, or any
object with public fields)public static void parseElement(org.xmlpull.v1.XmlPullParser parser, Object destination, XmlNamespaceDictionary namespaceDictionary, Xml.CustomizeParser customizeParser) throws IOException, org.xmlpull.v1.XmlPullParserException
Requires the the current event be XmlPullParser.START_TAG
(skipping any initial
XmlPullParser.START_DOCUMENT
) of the element being parsed. At normal parsing
completion, the current event will either be XmlPullParser.END_TAG
of the element being
parsed, or the XmlPullParser.START_TAG
of the requested atom:entry
.
parser
- XML pull parserdestination
- optional destination object to parser into or null
to ignore XML
contentnamespaceDictionary
- XML namespace dictionary to store unknown namespacescustomizeParser
- optional parser customizer or null
for none
IOException
org.xmlpull.v1.XmlPullParserException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |