Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

More than one in XML tag?

 
Pan Niko
Ranch Hand
Posts: 86
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is possible to have more than one elements in a tag? For example, i want to have address of photos in the same tag. If yes, how?

Thank you
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you perhaps talking about "attributes" ?

Basic XML article in Wikipedia.

Bill
 
Pan Niko
Ranch Hand
Posts: 86
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, no..i mean something like that, <image>pic_1.jpg, pic_2.jpg, pic_3.jpg, pic_4.jpg</image>

is possible?
 
Paul Clapham
Sheriff
Posts: 21297
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, you can put any text you like inside an element. But your example is really not a good design, because it requires the consumer of the document to use some non-XML rules to split that text up into meaningful information. An obvious improvement is this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic