• 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

db to java to xml

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hiya!!
Can I create an xml file from a db call in java? I keep reading about parsing xml into java but I don't see it the other way around? I have login data stored in a table, I want to create an xml file from this data and use it to create the user's menu. The company I work for has multiple customers they work with, our groups have access to some, all, none of these customers in different capacity (admin, order entry, etc..) At the moment we have a new menu for each customer and tons of checks for the user's level of access, which customer they're working with etc... It's way too hard to manage at the moment and I was hoping to make it easier.
What I was hoping to do is to build this xml when they login and they'd have it throughout their session. After the logout or expire I'll delete the file. I could keep it around but user levels/access change all the time, I don't want to run the risk of having bad data. Unless I can update the xml for the user, that'd be even better.
BUT, I know nothing about xml and the sites I've gone to so far have been very confusing to say the least. I don't want the solution handed to me, just some guidance in how to go about learning how to do this and if this seems like the right way to go about this.
Thanks for reading the babbling
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To me it seems that XML might not be the magic ingredient you're looking for. XML is good at representing structured data in a platform independent way, yes, but it is not too well-suited for programming. What I mean is that it would be a lot easier for you to store the data as a Java object instead of storing it as an XML file and parsing it every time you need to check something against it.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic