my dog learned polymorphism
The moose likes XML and Related Technologies and the fly likes A basic question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "A basic question" Watch "A basic question" New topic

A basic question

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
I am still at learning stage
Is it possible in xml

that is a tag A contains tag B whreas tag B may further contain tag A in a same document

Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Bhushan Jawle
Ranch Hand

Joined: Nov 22, 2001
Posts: 249
Assuming there is a root element which encloses these elements and this is valid specification according to dtd (if being validated against dtd) it is possible.
Ritu Kama
Ranch Hand

Joined: Sep 10, 2001
Posts: 72
Can you give a better example. Or if you have a sample of what kind of XML you are trying to produce.
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
You'd probably do well to write a DTD first, to understand what kind of data you are trying to represent.

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
It is sorta covered in the JavaRanch Style Guide.
subject: A basic question
It's not a secret anymore!