जेएक्सबी का उपयोग करना यह सुनिश्चित करना संभव है कि शून्य मानों को खाली तत्वों के रूप में चिह्नित नहीं किया जा सके। उदाहरण के लिएjaxb marshalling खाली तत्वों को छोड़ें
public class Contacts {
@XmlElement(name = "Phone")
protected List<Phone> phone;
}
वर्तमान में अगर फोन तत्व के एक रिक्त है मैं
<contact>
</phone>
<phone>
<areacode>919</areacode>
<phonenumber>6785432</phonenumber>
</phone>
</contact>
मैं निम्नलिखित उत्पादन
<contact>
<phone>
<areacode>919</areacode>
<phonenumber>6785432</phonenumber>
</phone>
</contact>