XML attribute order

Welcome Forums General PowerShell Q&A XML attribute order

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 11 months ago.

  • Author
  • #72416

    Topics: 58
    Replies: 89
    Points: 3
    Rank: Member

    I have an attribute in an element. For simplicity sake I have two attributes. What I would like is to have the Name attribute appearing first.

    I thought it was a case of doing the method of the setattribute in the order that we want.

    However that didn't seem to work.

    Any help most appreciative.

  • #72430

    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    I'm honestly not sure if .NET's XML interface allows this. XML doesn't "care" about the order, so most XML libraries don't provide a way to manipulate the order. You might consider asking in someplace like StackOverflow.com. Keep in mind that you're really using .NET here, not PowerShell per se, and the developer-centric audience on that website would likely have a better answer for you.

The topic ‘XML attribute order’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort