我有以这种方式格式化的XML数据:1,2,3,4,5,69,8,7,6,5,41,2,3,4,5,69,8,7,6,5,4我正在尝试使用xmlstarlet将此数据解析为文本文件(以逗号分隔)。所需的输出如下所示:TimeAttribute,ChannelAttribute,Data01/01/20093:00:02AM,I,1,2,3,4,5,601/01/20093:00:02AM,II,9,8,7,6,5,401/01/20093:00:02AM,I,1,2,3,4,5,601/01/20093:00:02AM,II,9,8,7,6,5,4我能想到的最好的是:xmlstarlet
我有一个Write方法,可以序列化使用XmlAttributes的对象。这是非常标准的:privateboolWriteXml(DirectoryInfodir){varxml=newXmlSerializer(typeof(Composite));_filename=Path.Combine(dir.FullName,_composite.Symbol+".xml");using(varxmlFile=File.Create(_filename)){xml.Serialize(xmlFile,_composite);}returntrue;}除了尝试读取我刚刚写出的文件(使用架构验证