Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any Java API similar to DataSet in ADO.NET

 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to read and xml file and create java object and use the data in the xml file, I know this can be done using Castor and many other such APIs that create java objects from xml data.
What I am looking for is something like what ADO.NET provides (i.e DataSet) In ADO.NET a DataSet can be used to read an xml file and the DataSet is capable of interpereting the structure of the xml file and creating a sort of inmemory database ( called a DataSet ) of the xml file, and later you can bin the data in the DataSet to various visual controls. This is really cool --- is there some similar API in java ???
I dont know where I should be exactly be posting such a request ???
Vivek
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dataset is really a useful object, if i'm right then only castor or javaobject can be equivalent(more or less) to Dataset. Well u know that already. :roll:
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With DataSet in ADO.NET I can specify something like this programatically
1. Here is my xml file
2. Create a DataSet using this xml file
3. Interpert the DataSet ( DataTable) structure based on the xml file structure ( alternatively I can point to an xsd file )
4. Once I have the dataset with me I can bind the contents of the DataSet to different UI elements and I can also filter based on columns
.

Where as in Castor I have to generate Java Source files the represent XML element objects based on XML file or XSD file, in ADO.NET I have a chioce not to genereate code and do everything run time, though I can use something like strongly typed DataSets to generate code based XSD but that would be similar to what Castor is providing.
regards
vivek
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Come on guys I need some help here.
At least point me in some direction, any direction for that matter.
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am quite a bit guessing here, but isn't jsr235 similar : http://www.jcp.org/en/jsr/detail?id=235
There is a longer discussion around the topic in Websphere forum:
http://www.coderanch.com/t/74873/Websphere/Websphere-Data-Objects-WDO
Axel
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for some leads, I am going through JSR and it seems like it the thing that i was looking for.
How did you manage to get your hands on that ?
thanks again
vivek
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vivek,
I just saw the thread in the Websphere-Forum and I thought that it reminds me on what I've read about ADO.NET DataSet (don't have even practical experience with that one). Then I saw your question.
You might ask in Websphere-Forum to get more specific information. The topic looks interesting for crud-style use cases.
Axel
 
Vivek Viswanathan
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Alex, I will have a look at that too.
Been busy over the last few days so I have not been able to follow it up.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic