docs: @Override
      public JingleTransport parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException  {
          boolean done = false;
          JingleTransport trans = getInstance();
  
          while (!done) {
              int eventType = parser.next();
              String name = parser.getName();
  
              if (eventType == XmlPullParser.START_TAG) {
                  if (name.equals(JingleTransportCandidate.NODENAME)) {
                      JingleTransportCandidate jtc = parseCandidate(parser);
                      if (jtc != null) trans.addCandidate(jtc);
                  }
                  else {
                      // TODO: Should be SmackParseException.
                      throw new IOException("Unknown tag \"" + name + "\" in transport element.");
                  }
              }
              else if (eventType == XmlPullParser.END_TAG) {
                  if (name.equals(JingleTransport.NODENAME)) {
                      done = true;
                  }
              }
          }
  
          return trans;
      }