Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip.xcap.model.prescontent
Class PresContentParser

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.xcap.model.prescontent.PresContentParser

public class PresContentParser
extends Object

Utility class that helps to converts pres-content xml to the object model and object model to the pres-content xml.

Author:
Grigorii Balutsel

Constructor Summary
PresContentParser()
           
 
Method Summary
static ContentType fromXml(String xml)
          Creates xcap-caps object from the element.
static String toXml(ContentType content)
          Creates XML from the pres-content element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresContentParser

public PresContentParser()
Method Detail

fromXml

public static ContentType fromXml(String xml)
                           throws ParsingException
Creates xcap-caps object from the element.

Parameters:
xml - the XML to analyze.
Returns:
the xcap-caps object.
Throws:
ParsingException - if there is some error during parsing.

toXml

public static String toXml(ContentType content)
                    throws ParsingException
Creates XML from the pres-content element.

Parameters:
content - the pres-content to analyze.
Returns:
the pres-content xml.
Throws:
ParsingException - if there is some error during parsing.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.