XML的增加项目.添加属性 等

private   void  SaveXml()
        
{
            XmlDocument doc 
= new XmlDocument();
            
string path = Setting.Instance.QuestionXmlFile;
            doc.Load(path);

            XmlNodeList nodelist 
= doc.SelectNodes("//Questionnair/Categorys/Category/Quesition");
            AdvisorWebServiceSoapClient service 
= new AdvisorWebServiceSoapClient();
            String version 
= Function.ReadNodeText(doc.SelectSingleNode("//Questionnair/@Version"));
            String answer 
= service.GetAnwsers(_accountId, version);
            
string[] temp = answer.Split(';');
            
int[] result = new int[20];
            
for (int i = 0; i < temp.Length - 1; i++)
            
{
                result[i] 
= Convert.ToInt32(temp[i].Split(':')[1]);
            }


            
//问题答案的保存到xml
            问题答案的保存到xml

            
//分类结果保存到xml
            分类结果保存到xml

            
//综合类型保存到xml
            综合类型保存到xml

            String output 
= Setting.Instance.TempDirectory + "result.xml";
            doc.Save(output);
        }

你可能感兴趣的:(XML的增加项目.添加属性 等)