File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Customer Requirements for Developers this week in the Jobs Discussion 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

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

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

Basic XML article in Wikipedia.

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

Joined: Oct 14, 2005
Posts: 19693

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:
I agree. Here's the link:
subject: More than one in XML tag?
It's not a secret anymore!