Examples of VCard4DomWriter


Examples of org.onesocialweb.xml.dom.VCard4DomWriter

     
      // We fetch the profile of the target user
      Profile profile = ProfileManager.getInstance().getProfile(sender.toBareJID(), target.toBareJID());
     
      // Prepare the result packet
      VCard4DomWriter writer = new DefaultVCard4DomWriter();
      DOMDocument domDocument = new DOMDocument();
      IQ result = IQ.createResultIQ(packet);
      Element query = (Element) domDocument.appendChild(domDocument.createElementNS(NAMESPACE, NAME));
      if (profile != null) {
        writer.toElement(profile, query);
      } else {
        query.appendChild(domDocument.createElementNS(VCard4.NAMESPACE, VCard4.VCARD_ELEMENT));
      }
      result.setChildElement((org.dom4j.Element) query);
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.