Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Convert Text To XML

Here we are discussing the conversion of a text file into xml file by giving an example. This example creates an xml file with its root node and child node. Then pass values into the child node. These values are in text format which is taken as input from

Tutorial Details:

Here we are discussing the conversion of a text file into xml file by giving an example. This example creates an xml file with its root node and child node. Then pass values into the child node. These values are in text format which is taken as input from console.

To convert text into xml file first create a xml file by using FileInputStream. Modify the xml file by using OutputStreamReader. Use BufferedReader to take the input from console. In this example we are taking 10 string from console and store these strings into an array of string. First write xml version tag e.g. then create the root and child node into xml file. Pass array string as value of nodes. We are inserting ten nodes and passing the values at each nodes into xml file.


 

Rate Tutorial:
http://www.roseindia.net/java/java-conversion/TextToXML.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Convert Text To XML

View Tutorial:
Convert Text To XML

Related Tutorials:

XML JavaBeans, Part 1 - JavaWorld February 1999
XML JavaBeans, Part 1 - JavaWorld February 1999
 
XML JavaBeans, Part 2 - JavaWorld March 1999
XML JavaBeans, Part 2 - JavaWorld March 1999
 
Using XML and JSP together - JavaWorld March 2000
Using XML and JSP together - JavaWorld March 2000
 
WAP for Java developers - JavaWorld June 2000
WAP for Java developers - JavaWorld June 2000
 
Programming XML in Java, Part 3 - JavaWorld July 2000
Programming XML in Java, Part 3 - JavaWorld July 2000
 
Easy Java/XML integration with JDOM, Part 2 - JavaWorld July 2000
Easy Java/XML integration with JDOM, Part 2 - JavaWorld July 2000
 
Mapping XML to Java, Part 1 - JavaWorld August 2000
Mapping XML to Java, Part 1 - JavaWorld August 2000
 
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
 
XML APIs for databases - JavaWorld January 2000
XML APIs for databases - JavaWorld January 2000
 
Take the sting out of SAX
Take the sting out of SAX
 
JavaWorld article
JavaWorld article
 
Joott Quick Start Guide
Joott Quick Start Guide JooTemplates is a templating system to generate business documents, such as forms, mailings and reports. It is being developed with the following aims
 
FastParser 1.6.3
FastParser 1.6.9.1 XML Edition FastParser is a Java Xml parser High performance XML parser (benchmarks* : up to +100% faster compared to Xerces and JDK1.4 integrated parser) SAX Level 1 and 2 compliant DOM support JAXP compatibility Names
 
JXMLPad 2.3
JXMLPad 2.3 JXMLPad is a pure Swing java component/framework for editing XML/XHTML document.
 
PrEd
PrEd is a Java based graphical utility to find and edit Java property files in JAR, WAR, EAR and other kind of ZIP archives. It is the perfect tool for customizing Java applications, which use XML and Property files for their configuration.
 
Getting Groovy with XML
XML sucks. Oh, wait, XML rocks. Well, it actually does a lot of both. It rocks because of all of the editors, validators, and tools written for it. XML has all but replaced any notion of a new custom text-based data language. But it also sucks because it\
 
IRC Text to Speech with Java
This article will show you how to create a multi-platform IRC bot (an automated client) that uses the FreeTTS Java speech synthesizer library to convert IRC messages into audible speech.
 
JXMLPad 3.1 FC
JXMLPad is a pure Swing java component/framework for editing XML/XHTML document.
 
Leverage JNLP and SOAP for Java Thick-client Development
Leverage JNLP and SOAP for Java Thick-client Development The hype during the mid-to-late 1990's over Java's utility to run swarms of autonomous applets was greatly exaggerated. This early enthusiasm (and marketing) for Java as a language with which devel
 
Simredo 4.0 - Java Unicode Editor
Simredo is a free Java Unicode editor.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.