How to create XML file with specific structure in Java [duplicate]
You can use the JDOM library in Java. Define your tags as Element objects, document your elements with Document Class, and build your xml file with SAXBuilder. Try this example: //Root Element Element root=new Element(“CONFIGURATION”); Document doc=new Document(); //Element 1 Element child1=new Element(“BROWSER”); //Element 1 Content child1.addContent(“chrome”); //Element 2 Element child2=new Element(“BASE”); //Element 2 Content … Read more