• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

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.
0
MonCapitan
Asked:
MonCapitan
  • 3
1 Solution
 
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:
I am going to close this question from lack of responses. Thanks.
0
 
MonCapitanAuthor Commented:
No answer provided and my last response was not replied to.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now