Powershell:在DataGrid中交换列和行(或更好的东西)

时间:2018-02-22 04:39:24

标签: powershell arraylist datagrid

以PowerShell形式使用数据网格。我想交换列和行,但我无法弄清楚如何做到这一点。

我似乎没有理解ArrayLists足以手动将值换出到新的ArrayList或一般的数组。

这在VBS中更容易,我理解数组如何在那里工作。 = /

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<schedule
          xmlns="http://tempuri.org/myschema/unique"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://tempuri.org/myschema/unique Schema.xsd">

  <student studentName="Name" studentId="123456"></student>
  <school>
    <name>University</name>
    <term>2018</term>
    <program>CPA</program>
  </school>
  <weekdays>
    <day weekday="Monday"></day>
    <day weekday="Tuesday">
      <class classHour="1500">
        <courseCode>ABC-123</courseCode>
        <classRoom>A2020</classRoom>
      </class>
      <class classHour="1500">
        <courseCode>EFG-456</courseCode>
        <classRoom>A2758</classRoom>
      </class>
    </day>
    <day weekday="Wednesday">
      <class classHour="1500">
        <courseCode>VBN-996</courseCode>
        <classRoom>R8595</classRoom>
      </class>
    <day weekday="Thursday"/>
    <day weekday="Friday"/>
  </weekdays>

</schedule>

0 个答案:

没有答案