• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help me? How to read an XML file in J2EE  RSS feed

 
Ravi Pydi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
My task is to read an XML file in J2EE environment. Then send the data into a database. I was told that we may have to use one of the parsers.
If somebody has got a sample code, please let me know.
The code can be on any of the following scenarios.
Scenario1: Create a Javabean(XML_To_Oracle) in J2EE that can take the XML message as input and write the XML PO data back to a Oracle DB.
Scenario2: Create a Javabean(XML_To_DB2) in J2EE that can take the XML message as input and write the XML PO data back to a DB2.
Scenario3: Create a Javabean(XMLRouterBean) in J2EE that can take the XML message as input and depending on the router string in the XML Message invokes either the XML_TO_Oracle Bean or the XML_TO_DB2 or Invokes Both.
Thanking You,
Ravi Pydi and the team
 
Sreenivasa Majji
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now a days all the major database vendors providing support for XML, such as data retrieval, validataion and storage.
I have no idea on DB2, but Oracle has some parsers which supports all the XML related activities. Please check their website for more information.
If you don't want to use third party products, you can implement SAX/DOM API in your application to suit your needs.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!