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
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
Joined: Mar 03, 2001
Posts: 350
posted
0
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
Joined: Mar 03, 2001
Posts: 350
posted
0
Come on guys I need some help here. At least point me in some direction, any direction for that matter.
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
Joined: Jan 08, 2001
Posts: 2164
posted
0
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
Joined: Mar 03, 2001
Posts: 350
posted
0
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.