File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection

 
ronald dsouza
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling a webservice which returns me a collection which contains a string like below:
Model1|mdesc|Table1|tdesc|Col1|cdesc
Model1|mdesc|Table2|tdesc|Col1|cdesc
Model1|mdesc|Table1|tdesc|Col2|cdesc
Model1|mdesc|Table2|tdesc|Col2|cdesc
.
.
.


I have to create a list showing how many table's the model has and its columns.
What is the best collection to use here? I might later have to iterate this collection and create a html page so it should be easier to access.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure from your brief description. Have you gone through the different types of collection, which you can find about here?

You might want a List of Lists, but that is not at all certain from your post.
 
ronald dsouza
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Not sure from your brief description. Have you gone through the different types of collection, which you can find about here?

You might want a List of Lists, but that is not at all certain from your post.

Input:
Model1|mdesc|Table1|tdesc1|Col1|cdesc1
Model1|mdesc|Table2|tdesc2|Col1|cdesc2
Model1|mdesc|Table1|tdesc1|Col2|cdesc3
Model1|mdesc|Table2|tdesc2|Col2|cdesc4
.
.
.

The output I except is:
model1
mdesc
Table1
tdesc1
col1
cdesc1
col2
cdesc3
table2
tdesc2
col1
cdesc2
col2
cdesc4

can this be done?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can explain how you get from the four lines above to the column below, then you can do it programmatically.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic