xml
1<?xml version="1.0" encoding="UTF-8"?> 2<object xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 3 <type1> 4 <string>0b8441dc72916d703a37e62a4fc233c4</string> 5 <string>95c88f20b3b2fa879b071bfb54ff91ca</string> 6 </type1> 7 <type2> 8 <string>9b071bfb5441dc72916ff91c869b07ac</string> 9 </type2> 10</object>
このようなXMLのobject内に、
var type2 = string[] { "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" }
var type3 = string[] { "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }
を追記したいです
objectは、
C#
1public class object 2{ 3 public string[] type1; 4 public string[] type2; 5 public string[] type3; 6}
のような形です。シリアライズはXmlSerializerでやっています。
xml
1<?xml version="1.0" encoding="UTF-8"?> 2<object xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 3 <type1> 4 <string>0b8441dc72916d703a37e62a4fc233c4</string> 5 <string>95c88f20b3b2fa879b071bfb54ff91ca</string> 6 </type1> 7 <type2> 8 <string>9b071bfb5441dc72916ff91c869b07ac</string> 9 <string>yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</string> 10 </type2> 11 <type3> 12 <string>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</string> 13 </type3> 14</object>
最終的にはこの形に持っていきたいです
やりたいことしか記載されてません。やってみたこと、その結果を記載してください。