Read variables from XML

Welcome Forums General PowerShell Q&A Read variables from XML

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

4 years, 3 months ago.

  • Author
  • #20167

    Points: 1
    Rank: Member

    Is it somehow possible to read variables and values from xml into an PowerShell script without specifying each of them separately?

    For example I've set the following variables:

    arrPostcode @()
    arrPostcode += ,@('1234AB', 'City1')
    arrPostcode += ,@('4567CD', 'City2')
    blnHome = $True
    blnNld = $False
    intNumbers = 556
    strText = 'Something'

    And I have a xml file like (can be ajusted when required to get a better result):

    See Attachment

    And say I want to use the 'default' values if the xml file was not found, but if the xml file is found I want to use (replace) the variables and values defined in that xml file.

  • #20168

    Points: 1
    Rank: Member

The topic ‘Read variables from XML’ is closed to new replies.

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