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 Java with XML -- help urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Java with XML -- help urgent" Watch "Java with XML -- help urgent" New topic
Author

Java with XML -- help urgent

Vids
Greenhorn

Joined: Oct 30, 2000
Posts: 8
I need to code an application with XML wherein data comes from a database say MSAccess. I want to have this in my Java application wherein it operates on XML data. I am constrained to use only Java as I know only programming in Java and of course XML. Please tell me how to go about this. A sample program would be of great help. Please suggest me some related links.
Thnx in advance,
Vids.
Sameer Rao
Greenhorn

Joined: Oct 12, 2000
Posts: 20
Hi Vids,
Are You planning to have a Web based application or its gonna be a standalone application ? When you say that data is coming from MS-Access, would you be building a XML document off that data (RowSet) and then pass this XML document to a Java program ?will this Java program be on the same machine or a remote machine ?

Assuming that you will be building the XML from the data retrieved from Access Db; You will need to use DOM parser. DOM parsers allow you to modify data in a XML document (or Create a XMl document.)
Hope this is helpful. Let me know if you would like to share ur requirements.
Best Regards.

------------------
_SvR_
[This message has been edited by Sameer Rao (edited October 30, 2000).]


_SvR_
Vids
Greenhorn

Joined: Oct 30, 2000
Posts: 8
Hi SVR,
It will be a standalone application. Yes, I would be building XML document using the data from MSAccess and then pass this XML document to Java program. All the programs will be on the same machine and no question of remaote machine.
So keeping these requirements, can U just gimme an idea how to proceed or a small piece of code wherein XML document is built in Java program and data comes from D/b.
Thanks,
Vids
prabhu palanisamy
Greenhorn

Joined: Oct 30, 2000
Posts: 27
hi vids,
i hope that u want a xml standalone application.
for that u need and xmlconverter which converts database records
into corresponding xml documents.then u do all the process on the xml documents.writing that xmlconverter is very easy.
use JDBC fetch the records and write the recordvalues within the tags.
now u use parsers to parse those xml documents.and now u can do all sort of stuff like rendering etc..
i hope this is sufficient to start.
bye
Sameer Rao
Greenhorn

Joined: Oct 12, 2000
Posts: 20
Hi vids,
Heres a represntation I thought of. This may not be the Best or the standard representation. I am sure there will be some standard representation DTD for RecordSet. If you come across one do let me know off it.
Hope this helps,
_SvR_
<ResultSetXSL>
<MetaData >
<Database name="Oracle8i" version="8.1.6" />
<ColumnInfo numberOfColumns="x" >
<Column Name="Employee_Name" dataType="String"/>
<Column Name="Employee_Age" dataType="int"/>
<Column Name="Employee_Address" dataType="String"/>
</ColumnInfo>
</MetaData>
<RowData>
<Row id="1" >
<Column name="Employee_Name" value="Sameer" dataType="String"/>
<Column name="Employee_Age" value="24" dataType="int"/>
<Column name="Employee_Address" value=" J4" dataType="String"/>
</Row>
<Row id="2" >
<Column name="Employee_Name" value=" Sameer" dataType="String"/>
<Column name="Employee_Age" value="24" dataType="int"/>
<Column name="Employee_Address" value=" J4" dataType="String"/>
</Row>
<Row id="3" >
<Column name="Employee_Name" value=" Sameer" dataType="String"/>
<Column name="Employee_Age" value="24" dataType="int"/>
<Column name="Employee_Address" value=" J4" dataType="String"/>
</Row>
</RowData>
</ResultSetXML>
------------------
_SvR_
[This message has been edited by Sameer Rao (edited November 15, 2000).]
monojit choudhury
Greenhorn

Joined: Nov 20, 2000
Posts: 23
hi vids
i think the xerces parser would be of great help to u.
u can find lots of topic on xerces in the net.
and if u have any queries about xml related things ...just visit www.w3schools.com or www.w3c.org.

Originally posted by Vids:
I need to code an application with XML wherein data comes from a database say MSAccess. I want to have this in my Java application wherein it operates on XML data. I am constrained to use only Java as I know only programming in Java and of course XML. Please tell me how to go about this. A sample program would be of great help. Please suggest me some related links.
Thnx in advance,
Vids.

Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Xerces (and Xalan) home: http://xml.apache.org/

42
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Hello , everybody. This is Shailesh here. New moderator of this forum. Welcome everyone in this cool place.
[b]I would start my mission right now. As you know that javaranch has got official naming policy. Every user has to register with proper first & last name.
Vids please reregister yourself with proper first & last name & help maintain the decorum of the forum.
YOUR FRIENDLEY BARTENDER
SHAILESH.
 
jQuery in Action, 2nd edition
 
subject: Java with XML -- help urgent