• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem understanding xml file

 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this:


I managed to create the class like this:


I'm having trouble with


how do I integrate these two lines into Address class?
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably you can create a collection of street lines.


or since you have line numbers mentioned as keys in xml, even a Map sounds relevant.

Another simple solution would be to have 2 Strings called and .
But your xml attribute
line="x"
inclines me towards a Collection or a Map
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the Address class will look like this:


there are some alternatives for Street class:







which one is best describing the xml?
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like the most. Due to your attribute line="x".
 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I feel the same way. thanks. problem solved nicely.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic