private void addFieldInDataIQ(agsXMPP.protocol.x.data.Data data, string fieldname, string value) { Field field = new Field(); field.Var = fieldname; agsXMPP.Xml.Dom.Element e = new agsXMPP.Xml.Dom.Element("value", value); field.AddChild(e); data.AddChild(field); }