Link to home
Start Free TrialLog in
Avatar of gisvpn
gisvpnFlag for United States of America

asked on

ID, IDREF could someone please explain them :)

Hi im trying to learn XML im very much a beginner :

Im trying to understand the concept and usage of IDREFs in XML. I belive there is also ID, IDREF and IDREFS. Im not sure if they can be used to uniquely identify something, but i would like to use this, if i could understand how it works ( i am also using a DTD ).

Would it please be possible for someone to explain what ID, IDREF and IDREFS is and if possible with examples explain why they would be used or how they could be used in XML.

Much appreciated.

Many thanks

GISVPN
Avatar of dualsoul
dualsoul

ID - is used to provide some unique identifier for element.
IDREF - is used to reference some ID.  Generally it means that you can define IDREF with the same value as some existent ID.

This is just to ensure data integrity and consistency, to ensure you have a reference to existent element only.
Avatar of gisvpn

ASKER

Hey Dualsoul thats great thanks for the post :)

Is there anyway in which you can give me a basic example ?
ASKER CERTIFIED SOLUTION
Avatar of dualsoul
dualsoul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial