  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Getting xml header for every input into xml file | Getting xml header for every input into xml file 2006-10-26 - By Mukunda
Back
Hi I am new to JDOM and I am getting xml headers for every input into xml file. I am inputting name and age into xml file through java swings. Below is the code that writes the data into xml file, I tried many ways, but still getting xml headers for every input and could you also please tell me how to check duplicate data while entering data into xml document. thanks.
Element ele= new Element("root"); Element name=new Element(jLabel1.getText().trim()); Element age= new Element(jLabel2.getText().trim()); ele.addContent(name); ele.addContent(s1); ele.addContent(age); ele.addContent(s2); Document doc=new Document(ele); FileOutputStream fout = new FileOutputStream("nameage.xml", true); XMLOutputter xmlout = new XMLOutputter(); xmlout.output(doc,fout); fout.flush(); -- View this message in context: http://www.nabble.com/Getting-xml-header-for -every-input-into-xml-file-tf2511764.html#a7004892 Sent from the JDOM - General mailing list archive at Nabble.com.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
|
|
 |