File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes  how I can use an XML file in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark " how I can use an XML file in java?" Watch " how I can use an XML file in java?" New topic

how I can use an XML file in java?

arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I have a XML file ..
Now I want to use this XML file in JAVA..
But I am facing some problem..
I don't know that how to use this XML file..
Is I need to download some .jar file for connecting this ..
Please tell me the whole process for using this XML file to connect database....

I know how to use JDBC...
But I am getting problem in fire XQUERY in java....
Please give solution for this so that I can get out of this problem.....
Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

The Java API for XML Processing (JAXP) page at might be a good place to start looking if you want to learn about the basics of dealing with XML in Java.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
pete stein

Joined: Feb 23, 2007
Posts: 1561
I've used XPath when I want to extract info out of an XML file relatively easily. It's hard to say if this would help you though as I think you need to give us more context, more information of just what you're trying to do with the XML file and why.
Suhas Bilaye
Ranch Hand

Joined: Sep 10, 2009
Posts: 80

You might also take a look at this. Xml file handling is now easier by using JAXB. You will actually need to use only java classes.
Check this link.


Thanks and Regards,
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Your question says something about XQuery. It seems to imply you had a problem when you tried something related to XQuery. Can you explain what you tried and what problem you had? As it stands, your question has almost no useful information in it.
I agree. Here's the link:
subject: how I can use an XML file in java?
It's not a secret anymore!