code: @Override
      public JingleContentDescription parse(XmlPullParser parser,
                      int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
                      IOException {
          boolean done = false;
          JingleContentDescription desc = getInstance();
  
          while (!done) {
              int eventType = parser.next();
              String name = parser.getName();
  
              if (eventType == XmlPullParser.START_TAG) {
                  if (name.equals(JingleContentDescription.JinglePayloadType.NODENAME)) {
                      desc.addJinglePayloadType(parsePayload(parser));
                  } else {
                      // TODO: Should be SmackParseException.
                      throw new IOException("Unknow element \"" + name + "\" in content.");
                  }
              } else if (eventType == XmlPullParser.END_TAG) {
                  if (name.equals(JingleContentDescription.NODENAME)) {
                      done = true;
                  }
              }
          }
          return desc;
      }
docs: Parse a iq/jingle/description element.
  
  @param parser the input to parse
  @return a description element
  @throws IOException
  @throws XmlPullParserException