Hi all, I have one question. When attribute_type is ID then #REQUIRED or #IMPLIED can be used as default. If suppose I have an element which appears more than once but without the ID value explicitly supplied (since IMPLIED will work here )then how could I refer to a particular element instance as there is no mean (ID value) with me to distinguish. Can anyone explain me what XML do in this kind of situation. Anup Batra
You have to refer to this element by some attribute value. Otherwise, it will be treated equally as all other elements with the same name.
<i>SCJP 1.2, SCWCD, IBM 141, IBM 483, SCJP 1.4, IBM 484, IBM 287, SCBCD, SCEA, SCJP 5.0, SCJP 6.0, SCWCD 5</i>
posted 17 years ago
“You have to refer to this element by some attribute value. Otherwise, it will be treated equally as all other elements with the same name.” Actually I want to ask about the uniqueness of the Attribute_Type ID here. What will be the value of att ID. Anup Batra
Anup, In this case if you want to refer to a particular element, then it is not possible. You can either loop through and handle the element you want to treat or compare with the element's content. It's rather a design issue. You need to have an ID attribute in case you want to refer to an element specifically. It is like database referential integrity (PK). Hope this helps, Rakesh.
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop