पर XmlElement को जोड़ने के लिए मुझे PowerShell में एक गैर-रूट तत्व में XmlElement जोड़ने में समस्या हो रही है।पावरशेल: गैर-रूट तत्व
मूल रूप से, इस एक्सएमएल दिया:
<clubs>
<club name="boca" position="1">
<field>bombonera</field>
<field>bombonerita</field>
</club>
<club name="racing" position="19">
<field>cilindro</field>
</club>
</clubs>
मैं इस
<clubs>
<club name="boca" position="1">
<field>bombonera</field>
<field>bombonerita</field>
</club>
<club name="racing" position="19">
<field>cilindro</field>
</club>
<club name="barracas" />
</clubs>
मैं एक तत्व बनाने हासिल करना चाहते हैं,
$new = $clubs.CreateElement("barracas")
जब मैं एक करने के लिए इस तत्व को जोड़ने का प्रयास गैर रूट नोड यानी
$clubs.clubs.club += $new
मैं
Cannot set "club" because only strings can be used as values to set XmlNode properties.
मैं क्या याद आ रही है मिल सकता है?