PowerShell XML update Attribute Value in a Loop

Welcome Forums General PowerShell Q&A PowerShell XML update Attribute Value in a Loop

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

 
Participant
3 years, 4 months ago.

  • Author
    Posts
  • #27645

    Participant
    Points: 0
    Rank: Member

    Below is the XML i am working on to Update the attribute VALUE based on the Parant Node DESCRIPTION Value..

    For Parant Node "FRUITS DESCRIPTION ="MANGO"". I have to Update VALUE =".log" to VALUE ="MANGO.log"

    For Parant Node "FRUITS DESCRIPTION ="pineapple"". I have to Update VALUE =".log" to VALUE ="pineapple.log"

    How to achive the same using powershell..

    I have a problem in the loop...

  • #27679

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    It's "parent."

    Without seeing any code, and some of the actual XML, it's impossible to tell you what you're doing wrong. Please note that you can't post XML directly in the forums. I'd suggest creating a GitHub Gist with your XML, and then pasting the Gist URL here in the forums.

  • #27747

    Participant
    Points: 0
    Rank: Member

    Don,
    Thanks for the response please find the below link ....

    https://etltechsolutions.wordpress.com/2015/07/22/powershell-working-with-xml/

    Hope this will help to understand what i am looking for.

    Thanks for your time...

The topic ‘PowerShell XML update Attribute Value in a Loop’ is closed to new replies.