webservice正在返回有趣的xml

时间:2013-08-09 01:50:53

标签: asp.net web-services xml-serialization

我的Web服务返回Dictionary<int, TrialBalanceAccountSummaryModel>结构,但返回的xml字符串看起来很有趣。

请参阅下面的图片,如何删除节点&lt; KeyValueOfintReport [random_char]&gt;,并将其替换为普通节点,例如&lt;报告&gt; ?

P.S。停止向蛇吸引腿,微软!

        <?xml version="1.0" encoding="UTF-8"?>
        <Reports>
           <KeyValueOfintReportLjh4bohd>
              <Key>10000001</Key>
              <Value>
                 <AccountNo>10000001</AccountNo>
                 <AccumulatedAmount>560000</AccumulatedAmount>
                 <CompanyCode>17</CompanyCode>
                 <FiscalYear>2012</FiscalYear>
                 <Period01Amount>560000</Period01Amount>
                 <Period02Amount>0</Period02Amount>
                 <Period03Amount>0</Period03Amount>
                 <Period04Amount>0</Period04Amount>
                 <Period05Amount>0</Period05Amount>
                 <Period06Amount>0</Period06Amount>
                 <Period07Amount>0</Period07Amount>
                 <Period08Amount>0</Period08Amount>
                 <Period09Amount>0</Period09Amount>
                 <Period10Amount>0</Period10Amount>
                 <Period11Amount>0</Period11Amount>
                 <Period12Amount>0</Period12Amount>
                 <Period13Amount>0</Period13Amount>
                 <Period14Amount>0</Period14Amount>
                 <Period15Amount>0</Period15Amount>
              </Value>
           </KeyValueOfintReportLjh4bohd>
           <KeyValueOfintReportLjh4bohd>
              <Key>10000002</Key>
              <Value>
                 <AccountNo>10000002</AccountNo>
                 <AccumulatedAmount>191234</AccumulatedAmount>
                 <CompanyCode>17</CompanyCode>
                 <FiscalYear>2012</FiscalYear>
                 <Period01Amount>191234</Period01Amount>
                 <Period02Amount>0</Period02Amount>
                 <Period03Amount>0</Period03Amount>
                 <Period04Amount>0</Period04Amount>
                 <Period05Amount>0</Period05Amount>
                 <Period06Amount>0</Period06Amount>
                 <Period07Amount>0</Period07Amount>
                 <Period08Amount>0</Period08Amount>
                 <Period09Amount>0</Period09Amount>
                 <Period10Amount>0</Period10Amount>
                 <Period11Amount>0</Period11Amount>
                 <Period12Amount>0</Period12Amount>
                 <Period13Amount>0</Period13Amount>
                 <Period14Amount>0</Period14Amount>
                 <Period15Amount>0</Period15Amount>
              </Value>
           </KeyValueOfintReportLjh4bohd>

        </Reports>

0 个答案:

没有答案