* get the jid info found
* @param node
* @return the jid
*/
public static String getJidfromResponse(Node node) {
Node query = node.getChild("query");
StringBuffer result = new StringBuffer();
Vector items = query.getChildren();
for (int i=0;i<items.size();i++) {
Node n = (Node)items.elementAt(i);
if (n.name.equals("item")) { //PATCH 2008
if (n.getValue("jid") != null)
result.append("jid: ").append(n.getValue("jid")).append("\n");
if (n.getChild("name") != null)
result.append("username: ").append(n.getChild("name").text).append("\n");
if (n.getChild("first") != null)
result.append("name: ").append(n.getChild("first").text).append("\n");
if (n.getChild("last") != null)
result.append("surname: ").append(n.getChild("last").text).append("\n");
if (n.getChild("nick") != null)
result.append("nick: ").append(n.getChild("nick").text).append("\n");
if (n.getChild("email") != null)
result.append("mail: ").append(n.getChild("email").text).append("\n").append("\n");
}
}
if (result.toString().equals(""))
return Contents.jud_nores;