我正在尝试将类对象序列化为字符串。但它从下面的代码中以 xml 的形式给出输出。
Dim x As New Xml.Serialization.XmlSerializer(response.GetType)
Dim sw As New IO.StringWriter()
x.Serialize(sw, response)
Return sw.ToString
电流输出
<Employees>
<Employee>John</Employee>
<Employee>Peter</Employee>
</Employees>
预期产出
<Employees><Employee>John</Employee><Employee>Peter</Employee></Employees>