• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Help of generating XML file from a Text File

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The application,i'm working on has the requiremnet of converting a complex Text file into an XML file.Currently i have the XSD of the xml file in place.
I'm new to XMl parsing and all those stuffs.
Can the JAXB be used to acheive this goal?If so,please walk me thru how it can be done.
Please throw some light on how it can be acheived effectively.
Thanks In Advance,
Sri
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out this link:

http://www.oreilly.com/catalog/javaxslt/chapter/ch05.html

You can use a SAX content handler to read from a file and fire off events to an XSL transformer that can turn it in to an XML file. I haven't done this in a while, but it works pretty good.

HTH,
Brian
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic