com.google.code.linkedinapi.schema.xpp
Class XppUtils

java.lang.Object
  extended by com.google.code.linkedinapi.schema.xpp.XppUtils

public class XppUtils
extends java.lang.Object

The Class DomUtils.

Version:
1.0
Author:
Nabeel Mukhtar

Constructor Summary
XppUtils()
           
 
Method Summary
static java.lang.Long getAttributeValueAsLongFromNode(org.xmlpull.v1.XmlPullParser node, java.lang.String attributeName)
          Gets the attribute value as long from node.
static java.lang.String getAttributeValueFromNode(org.xmlpull.v1.XmlPullParser node, java.lang.String attributeName)
          Gets the attribute value from node.
static java.lang.Long getElementValueAsLongFromNode(org.xmlpull.v1.XmlPullParser node)
          Gets the element value as long from node.
static java.lang.String getElementValueFromNode(org.xmlpull.v1.XmlPullParser node)
          Gets the element value from node.
private static boolean isNullOrEmpty(java.lang.String string)
          Checks if is null or empty.
static void setAttributeValueToNode(org.xmlpull.v1.XmlSerializer serializer, java.lang.String attributeName, java.lang.Object attributeValue)
          Sets the attribute value to node.
static void setElementValue(org.xmlpull.v1.XmlSerializer serializer, java.lang.Object elementValue)
          Sets the element value.
static void setElementValueToNode(org.xmlpull.v1.XmlSerializer serializer, java.lang.String elementName, java.lang.Object elementValue)
          Sets the element value to node.
static void skipSubTree(org.xmlpull.v1.XmlPullParser parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XppUtils

public XppUtils()
Method Detail

setElementValueToNode

public static void setElementValueToNode(org.xmlpull.v1.XmlSerializer serializer,
                                         java.lang.String elementName,
                                         java.lang.Object elementValue)
                                  throws java.io.IOException
Sets the element value to node.

Parameters:
node - the node
elementName - the element name
elementValue - the element value
Throws:
java.io.IOException

setElementValue

public static void setElementValue(org.xmlpull.v1.XmlSerializer serializer,
                                   java.lang.Object elementValue)
                            throws java.io.IOException
Sets the element value.

Parameters:
node - the node
elementValue - the element value
Throws:
java.io.IOException

setAttributeValueToNode

public static void setAttributeValueToNode(org.xmlpull.v1.XmlSerializer serializer,
                                           java.lang.String attributeName,
                                           java.lang.Object attributeValue)
                                    throws java.io.IOException
Sets the attribute value to node.

Parameters:
node - the node
attributeName - the attribute name
attributeValue - the attribute value
Throws:
java.io.IOException

getElementValueFromNode

public static java.lang.String getElementValueFromNode(org.xmlpull.v1.XmlPullParser node)
                                                throws org.xmlpull.v1.XmlPullParserException,
                                                       java.io.IOException
Gets the element value from node.

Parameters:
node - the node
valueName - the value name
Returns:
the element value from node
Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException

getElementValueAsLongFromNode

public static java.lang.Long getElementValueAsLongFromNode(org.xmlpull.v1.XmlPullParser node)
                                                    throws java.io.IOException,
                                                           org.xmlpull.v1.XmlPullParserException
Gets the element value as long from node.

Parameters:
node - the node
valueName - the value name
Returns:
the element value as long from node
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

getAttributeValueFromNode

public static java.lang.String getAttributeValueFromNode(org.xmlpull.v1.XmlPullParser node,
                                                         java.lang.String attributeName)
Gets the attribute value from node.

Parameters:
node - the node
attributeName - the attribute name
Returns:
the attribute value from node

getAttributeValueAsLongFromNode

public static java.lang.Long getAttributeValueAsLongFromNode(org.xmlpull.v1.XmlPullParser node,
                                                             java.lang.String attributeName)
Gets the attribute value as long from node.

Parameters:
node - the node
attributeName - the attribute name
Returns:
the attribute value as long from node

skipSubTree

public static void skipSubTree(org.xmlpull.v1.XmlPullParser parser)
                        throws org.xmlpull.v1.XmlPullParserException,
                               java.io.IOException
Throws:
org.xmlpull.v1.XmlPullParserException
java.io.IOException

isNullOrEmpty

private static boolean isNullOrEmpty(java.lang.String string)
Checks if is null or empty.

Parameters:
string - the string
Returns:
true, if is null or empty