byte[] Content = Encoding.Convert(Encoding.GetEncoding("ISO-8859-1"),Encoding.UTF8, fileAttachment.Content);
fileArray.Add(fileAttachment.Name, Content);
我需要从XML中的XML <0.05中获取值。但是在转换字节数组时,它返回空值。
下面给出的XML示例。
<TestMethod Variant="Ash Calculated DMA" Name="INT 1004">
<TestParameter Name="Ash">
<Result><0.01</Result>
<Unit>% (m/m)</Unit>
<SpecReport Name="Ash" SpecName="DMA 2005">
<GroupCondition>Spec Met</GroupCondition>
</SpecReport>
<SpecReport Name="Ash" SpecName="DMA 2012">
<GroupCondition>Spec Met</GroupCondition>
</SpecReport>
</TestParameter>
</TestMethod>