import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.apache.crimson.tree.*;
import java.io.*;public class a 
{
public static void  main(String args[])
{
try
  {
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder=factory.newDocumentBuilder();
    Document doc=builder.parse("Books.xml");     
    NodeList nl =doc.getElementsByTagName("Information");
     Element node=(Element) nl.item(0);
    
            node.getElementsByTagName("Topic").item(0).getFirstChild().setNodeValue("aaa");
            node.getElementsByTagName("Content").item(0).getFirstChild().setNodeValue("bbb");
            node.getElementsByTagName("Date").item(0).getFirstChild().setNodeValue("ccc");
            node.getElementsByTagName("Source").item(0).getFirstChild().setNodeValue("ddd");
            
             ((XmlDocument)doc).write(new FileWriter("Books.xml"));
 }
 catch(Exception e)
 {
    System.out.println(e.getMessage());
 
 }
}
}