assign a unique id to every xml node

Hi,

What would be the best way to assign a unique id to each node in an xml file in code i.e. not using an xsd or dtd file?

Thanks for your time with this.
MonCapitanAsked:
Who is Participating?
 
MonCapitanConnect With a Mentor Author Commented:
I am going to close this question from lack of responses. Thanks.
0
 
radcaesarCommented:
System.Guid.NewGuid().ToString()

This will generate unique IDs every time.
0
 
MonCapitanAuthor Commented:
Ok thanks. But would I have to iterate through every node myself and assign the id attribute with a value? i.e. there is no built in process for this?
0
 
MonCapitanAuthor Commented:
No answer provided and my last response was not replied to.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.