Title :Remove element from xml,but if empty element in input file then output should be <tag></tag>, not like <tag.xml/>

xmlFile :
<?xml version="1.0"?>
<E-mail>
<To>Rohan</To>
<From></From>
<Subject>Surprise....</Subject>
<Body>Be ready for a cruise...</Body>
</E-mail>


JAVA Code :
public class RemoveElement {
static public void main(String[] arg) {
try{
File file = new File("a.xml");
String remElement = "To";
if (file.exists()){
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse("a.xml");
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer tFormer = tFactory.newTransformer();
Element element = (Element)doc.getElementsByTagName(remElement).item(0);
// Remove the node
element.getParentNode().removeChild(element);
// Normalize the DOM tree to combine all adjacent nodes
doc.normalize();
Source source = new DOMSource(doc);
FileOutputStream out = new FileOutputStream("b.xml");
PrintStream p = new PrintStream(out);
Result dest = new StreamResult(p);

tFormer.transform(source, dest);
System.out.println();
}
else{
System.out.println("File not found!");
}
}
catch (Exception e){
System.err.println(e);
System.exit(0);
}
}
}

But it will give output xml file:
<?xml version="1.0"?>
<E-mail>
<To>Rohan</To>
<From/>
<Subject>Surprise....</Subject>
<Body>Be ready for a cruise...</Body>
</E-mail>

I want empty tag <From></From> not like <From/>

How can i do this