Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

generating dynamic xml with java

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,
first of all i'm sorry if i have posted this question in this forum instead of java forum.
could somebody help me solve this problem ,i have a text file downloaded from internet and i have to generate a dyanmic xml file using java. By dynamic, i mean the tags and the data,both are dynamic.the name of the tags will be in uppercase in the text file,but some of the datas will also be in uppercase.is there anyway i can create the tags.
Happy Coding
Lavanya
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The simplest thing to do would be to just write the XML text on the fly as you parse the text file. An alternative would be to build a DOM in memory using the methods in org.w3c.dom package of the JAXP parser, and then serialize the results.
Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic