Class MetaDataUtils

java.lang.Object
org.jivesoftware.smackx.workgroup.util.MetaDataUtils

public class MetaDataUtils extends Object
Utility class for meta-data parsing and writing.
  • Constructor Details

  • Method Details

    • parseMetaData

      Parses any available meta-data and returns it as a Map of String name/value pairs. The parser must be positioned at an opening meta-data tag, or the an empty map will be returned.
      Parameters:
      parser - the XML parser positioned at an opening meta-data tag.
      Returns:
      the meta-data.
      Throws:
      XmlPullParserException - if an error occurs while parsing the XML.
      IOException - if an error occurs while parsing the XML.
    • serializeMetaData

      public static String serializeMetaData(Map<String,List<String>> metaData)
      Serializes a Map of String name/value pairs into the meta-data XML format.
      Parameters:
      metaData - the Map of meta-data as Map<String, List<String>>
      Returns:
      the meta-data values in XML form.