@ Override public String toXML ( org . jivesoftware . smack . packet . XmlEnvironment enclosingNamespace ) { StringBuilder buf = new StringBuilder ( ) ; buf . append ( ' ' ) . append ( getElementName ( ) ) . append ( " xmlns=\"" ) ; buf . append ( getNamespace ( ) ) . append ( "\" " ) ; synchronized ( candidates ) { if ( getCandidatesCount ( ) > 0 ) { buf . append ( ' ' ) ; Iterator < JingleTransportCandidate > iter = getCandidates ( ) ; while ( iter . hasNext ( ) ) { JingleTransportCandidate candidate = iter . next ( ) ; buf . append ( candidate . toXML ( ) ) ; } buf . append ( "</" ) . append ( getElementName ( ) ) . append ( ' ' ) ; } else { buf . append ( "/>" ) ; } } return buf . toString ( ) ; }
Return the XML representation for this element .