This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes More than one in XML tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "More than one in XML tag?" Watch "More than one in XML tag?" New topic
Author

More than one in XML tag?

Pan Niko
Ranch Hand

Joined: Mar 19, 2011
Posts: 86

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

Joined: Mar 22, 2000
Posts: 12890
    
    5
Are you perhaps talking about "attributes" ?

Basic XML article in Wikipedia.

Bill
Pan Niko
Ranch Hand

Joined: Mar 19, 2011
Posts: 86

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
Bartender

Joined: Oct 14, 2005
Posts: 19351
    
  10

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:
 
rocket mass heater kickstarter
 
subject: More than one in XML tag?