title: Cannot parse xml file in jenkins pipeline
body: <p>I have simple xml file, that I need to parse in pipeline.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="true"?&gt;
  
  &lt;AS Name="123"&gt;
      &lt;Config Name="Configuration1"&gt;
          &lt;Servers&gt;
              &lt;Server Name="server1"/&gt;
              &lt;Server Name="server2"/&gt;
              &lt;Server Name="server3"/&gt;
              &lt;Server Name="server4"/&gt;
           &lt;/Servers&gt;
      &lt;/Config&gt;
  &lt;/AS&gt;
  </code></pre>
  
  <p>I need to extract values of all servers' names into variable. 
  So I used code below but get only "unclassified field java.lang.string Config" exception</p>
  
  <pre><code>deleteDir()
  stage("upload") {
      def inputFile = input message: 'Upload file', parameters: [file(name: 'parameters.xml')]
      new hudson.FilePath(new File("$workspace/parameters.xml")).copyFrom(inputFile)
      inputFile.delete()
  }
  
  stage ("parse")
  {
      def xml = readFile "${env.WORKSPACE}/parameters.xml"
      def config = new XmlParser().parseText(xml)
  
  
  
      config.Config.Servers.Server.each{
          println it.@Name
      }
  
  }
  </code></pre>
  
  <p>XMLSlurper didn't help too. 
  What am I doing wrong?</p>
  
  <p>UPD: rewrite pipeline using noncps but it didn't give the result</p>
  
  <pre><code>node
  {
  
      deleteDir()
      stage("upload") {
          def inputFile = input message: 'Upload file', parameters: [file(name: 'parameters.xml')]
          new hudson.FilePath(new File("$workspace/parameters.xml")).copyFrom(inputFile)
          inputFile.delete()
       }
  
      stage("checkout") {
          echo fileExists('parameters.xml').toString()
      }
  
      stage ("parse")
      {
  
          def xml = readFile "${env.WORKSPACE}/parameters.xml"
  
          println servers(xml)
      }
  }
  
  @NonCPS
  def servers(xmlfile) {
      def serv = [:]
      def config = new XmlParser().parseText(xmlfile)
      config.Config.Servers.Server.each{
      serv.add(it.@name)
      }
      return serv
  }
  </code></pre>
  
  <p>Error ouput now is:</p>
  
  <pre><code>org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified field groovy.util.Node Config
  </code></pre>