File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes db to java to xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "db to java to xml" Watch "db to java to xml" New topic
Author

db to java to xml

Kristol Crawley
Greenhorn

Joined: Sep 17, 2003
Posts: 7
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
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: db to java to xml
 
Similar Threads
RMI client-side SQL and File I/O
Interview questions about Login, urgent!
BEA WebLogic Container Security
java, xml schema and relation db
BEA WebLogic Container Security