assign a unique id to every xml node

Posted on 2011-05-04
Last Modified: 2012-05-11

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.
Question by:MonCapitan
    LVL 9

    Expert Comment


    This will generate unique IDs every time.

    Author Comment

    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?

    Accepted Solution

    I am going to close this question from lack of responses. Thanks.

    Author Closing Comment

    No answer provided and my last response was not replied to.

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now