Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Generating XML files with Java
Closed Thread
Old 07-16-2007, 05:57 PM   #1 (permalink)
 
True Techie

Join Date: May 2006

Posts: 184

ssjheero_yuy99

Default Generating XML files with Java

I'm looking for a way to generate XML files from scratch using Java. I have been looking around at DOM, SAX, and JAXP but am getting completely confused.

If anyone knows the a way to do this, or can point me to a good tutorial it would be very much appricated.

Thanks for reading,
__________________
Tech TV is Back!
www.dl.tv
-- watch it, its good stuff.
-------------------------------
AMD Athlon 64 3400+
Powered by: Antec Earth Watts
-------------------------------
ssjheero_yuy99 is offline  
Old 07-16-2007, 06:58 PM   #2 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: Generating XML files with Java

Quote:
Originally Posted by ssjheero_yuy99 View Post
I'm looking for a way to generate XML files from scratch using Java. I have been looking around at DOM, SAX, and JAXP but am getting completely confused.

If anyone knows the a way to do this, or can point me to a good tutorial it would be very much appricated.

Thanks for reading,
What's the problem/where are you stuck? XML files aren't special...:rolleyes: If you know the formatting/layout of your file, write a couple methods and get it done? (Sorry, not seeing what you need help with.)
__________________
Vormund is offline  
Old 07-16-2007, 08:46 PM   #3 (permalink)
 
True Techie

Join Date: May 2006

Posts: 184

ssjheero_yuy99

Default Re: Generating XML files with Java

actually, I'm kinda back to square one, I am having trouble even figuring out the parser without just copying and pasting code from online. and since this is sorta a commercial project (I'm a temporary hand working on it, so I don't know the full details on its status, but I will be asking questions at a meeting tomorrow), I can't just copy and paste the code in.

Basically I'm a c++ programmer who was thrown into the Java world. I've never taken any Java classes, (still in college with little experience), and am having troubles.

Maybe the problem is that I'm not exactly sure what the problem is.... (yea, I know I'll get some smart remarks for this one)

I know I could just write it all out using standard output to files, but my superior says that I should try and use SAX, and I know I've found a couple third-party classes that would probably do it, but they don't want to use third-party stuff either, just Java supported classes. (not wanting to have to worry about joe-smoes class errors I guess)

Ok, this rambling has helped a little. But yes, we are currently trying to hammer out the DTD, so once we know this, it might just be a simple matter of writing things out by hand and finding a validation tool to check against the DTD, (which will most likely be converted to XML Schema, so please don't start harping on how it should be an XML Schema instead).

ah... month 7 of a 3 year project... will probably all be for not anyway... but got to keep the boss happy.

ok, all this rant and not even really answering the question.... so,
"What's the problem/where are you stuck?"

I think its just not knowing Java very well and not used to having to setup soo many factories and buffers and wrappers-over-wrappers-over-wrappers, and soo many wrappers.....
__________________
Tech TV is Back!
www.dl.tv
-- watch it, its good stuff.
-------------------------------
AMD Athlon 64 3400+
Powered by: Antec Earth Watts
-------------------------------
ssjheero_yuy99 is offline  
Old 07-17-2007, 12:55 PM   #4 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: Generating XML files with Java

Hah, yeah, I hadn't heard of SAX before this, but after looking at their "Quickstart", I can see your troubles, especially considering you got thrown at Java! I quickly looked over the API, and it looks like the SAX package is purely for reading the XML files (I may be wrong -- I'm fairly new in the Java world as well)...so to me, it would seem by far the most efficient, to create your own XML handler, if that is in any way an option.

But like you said, I guess that means waiting for the DTD to do any specifics. :freak:
__________________
Vormund is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bsod -need Reboot Help To Save Files! CJ_Wigg Windows Operating Systems and Software 1 07-14-2007 06:13 AM
Dangerous Java Flaw Threatens Virtually Everything Osiris Virus - Spyware Protection / Detection 1 07-13-2007 04:44 PM
Java Game Yek Programming Discussions 5 06-16-2007 04:29 AM
I have a problem with Sony Vegas and how it handles .avi files On A Mission Windows Operating Systems and Software 0 05-06-2007 08:14 PM
Strange Problem - Cannot get mp3 or wma files to play but wav files will play..read afulls04 Computer Audio & Multimedia 8 04-23-2007 04:57 AM