0
我有一個簡單的SELECT語句,FOR XML AUTO,ELEMENTS的SQL查詢。Flowgear SQL查詢XML結果
這是一個樣本文本結果在SQL Management Studio中:
> XML_F52E2B61-18A1-11d1-B105-00805F49916B
> -------------------------------------------------------------------------------- <row><CompanyID>0</CompanyID><Company>0
> </Company><GlCode>00-1010</GlCode><GlYear>2009</GlYear><BeginYearBalance>0.00</BeginYearBalance><ClosingBalPer1>50251640.00</ClosingBalPer1><ClosingBalPer2>45141985.00</ClosingBalPer2><ClosingBalPer3>43603485.00</C
> lPer7><ClosingBalPer8>0.00</ClosingBalPer8><ClosingBalPer9>0.00</ClosingBalPer9><ClosingBalPer10>0.00</ClosingBalPer10><ClosingBalPer11>0.00</ClosingBalPer11><ClosingBalPer12>0.00</ClosingBalPer12><ClosingBalPer13>0.00</ClosingBalPer13><ClosingBalPer14>0.0
> BalPer1><ClosingBalPer2>20000.00</ClosingBalPer2><ClosingBalPer3>0.00</ClosingBalPer3><ClosingBalPer4>0.00</ClosingBalPer4><ClosingBalPer5>0.00</ClosingBalPer5><ClosingBalPer6>0.00</ClosingBalPer6><ClosingBalPer7>0.00</ClosingBalPer7><ClosingBalPer8>0.00</
> alPer14>
它創建爲每個記錄<row>
元件的熟悉結構,爲每列的元素。
然而,這是回來的時候我在Flowgear運行的節點:
<Result>
<Table>
<XML_F52E2B61-18A1-11d1-B105-00805F49916B><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1010</GlCode><GlYear>2009</GlYear><BeginYearBalance>0.00</BeginYearBalance><ClosingBalPer1>50251640.00</ClosingBalPer1><ClosingBalPer2>45141985.00</ClosingBalPer2><ClosingBalPer3>43603485.00</ClosingBalPer3><ClosingBalPer4>37602854.06</ClosingBalPer4><ClosingBalPer5>30477670.97</ClosingBalPer5><ClosingBalPer6>27131030.91</ClosingBalPer6><ClosingBalPer7>26489572.00</ClosingBalPer7><ClosingBalPer8>24508174.38</ClosingBalPer8><ClosingBalPer9>25107606.36</ClosingBalPer9><ClosingBalPer10>24838327.11</ClosingBalPer10><ClosingBalPer11>28456828.16</ClosingBalPer11><ClosingBalPer12>3205488.90</ClosingBalPer12><ClosingBalPer13>3205488.90</ClosingBalPer13><ClosingBalPer14>3205488.90</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1010</GlCode><GlYear>2010</GlYear><BeginYearBalance>3205488.90</BeginYearBalance><ClosingBalPer1>69904850.41</ClosingBalPer1><ClosingBalPer2>70035845.09</ClosingBalPer2><ClosingBalPer3>69751854.18</ClosingBalPer3><ClosingBalPer4>76699659.70</ClosingBalPer4><ClosingBalPer5>64868593.99</ClosingBalPer5><ClosingBalPer6>63343067.84</ClosingBalPer6><ClosingBalPer7>67160186.41</ClosingBalPer7><ClosingBalPer8>66030723.36</ClosingBalPer8><ClosingBalPer9>67336905.21</ClosingBalPer9><ClosingBalPer10>67363017.56</ClosingBalPer10><ClosingBalPer11>67275039.96</ClosingBalPer11><ClosingBalPer12>64310025.92</ClosingBalPer12><ClosingBalPer13>64310025.92</ClosingBalPer13><ClosingBalPer14>64310025.92</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1010</GlCode><GlYear>2011</GlYear><BeginYearBalance>64310025.92</BeginYearBalance><ClosingBalPer1>63333898.71</ClosingBalPer1><ClosingBalPer2>63334486.71</ClosingBalPer2><ClosingBalPer3>0.00</ClosingBalPer3><ClosingBalPer4>0.00</ClosingBalPer4><ClosingBalPer5>0.00</ClosingBalPer5><ClosingBalPer6>0.00</ClosingBalPer6><ClosingBalPer7>0.00</ClosingBa</XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</Table>
<Table>
<XML_F52E2B61-18A1-11d1-B105-00805F49916B>lPer7><ClosingBalPer8>0.00</ClosingBalPer8><ClosingBalPer9>0.00</ClosingBalPer9><ClosingBalPer10>0.00</ClosingBalPer10><ClosingBalPer11>0.00</ClosingBalPer11><ClosingBalPer12>0.00</ClosingBalPer12><ClosingBalPer13>0.00</ClosingBalPer13><ClosingBalPer14>0.00</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1020</GlCode><GlYear>2009</GlYear><BeginYearBalance>0.00</BeginYearBalance><ClosingBalPer1>20000.00</ClosingBalPer1><ClosingBalPer2>20000.00</ClosingBalPer2><ClosingBalPer3>20000.00</ClosingBalPer3><ClosingBalPer4>20000.00</ClosingBalPer4><ClosingBalPer5>20000.00</ClosingBalPer5><ClosingBalPer6>20000.00</ClosingBalPer6><ClosingBalPer7>20000.00</ClosingBalPer7><ClosingBalPer8>20000.00</ClosingBalPer8><ClosingBalPer9>20000.00</ClosingBalPer9><ClosingBalPer10>20000.00</ClosingBalPer10><ClosingBalPer11>20000.00</ClosingBalPer11><ClosingBalPer12>20000.00</ClosingBalPer12><ClosingBalPer13>20000.00</ClosingBalPer13><ClosingBalPer14>20000.00</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1020</GlCode><GlYear>2010</GlYear><BeginYearBalance>20000.00</BeginYearBalance><ClosingBalPer1>20000.00</ClosingBalPer1><ClosingBalPer2>20000.00</ClosingBalPer2><ClosingBalPer3>20000.00</ClosingBalPer3><ClosingBalPer4>20000.00</ClosingBalPer4><ClosingBalPer5>20000.00</ClosingBalPer5><ClosingBalPer6>20000.00</ClosingBalPer6><ClosingBalPer7>20000.00</ClosingBalPer7><ClosingBalPer8>20000.00</ClosingBalPer8><ClosingBalPer9>20000.00</ClosingBalPer9><ClosingBalPer10>20000.00</ClosingBalPer10><ClosingBalPer11>20000.00</ClosingBalPer11><ClosingBalPer12>20000.00</ClosingBalPer12><ClosingBalPer13>20000.00</ClosingBalPer13><ClosingBalPer14>20000.00</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1020</GlCode><GlYear>2011</GlYear><BeginYearBalance>20000.00</BeginYearBalance><ClosingBalPer1>20000.00</Closing</XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</Table>
<Table>
<XML_F52E2B61-18A1-11d1-B105-00805F49916B>BalPer1><ClosingBalPer2>20000.00</ClosingBalPer2><ClosingBalPer3>0.00</ClosingBalPer3><ClosingBalPer4>0.00</ClosingBalPer4><ClosingBalPer5>0.00</ClosingBalPer5><ClosingBalPer6>0.00</ClosingBalPer6><ClosingBalPer7>0.00</ClosingBalPer7><ClosingBalPer8>0.00</ClosingBalPer8><ClosingBalPer9>0.00</ClosingBalPer9><ClosingBalPer10>0.00</ClosingBalPer10><ClosingBalPer11>0.00</ClosingBalPer11><ClosingBalPer12>0.00</ClosingBalPer12><ClosingBalPer13>0.00</ClosingBalPer13><ClosingBalPer14>0.00</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1030</GlCode><GlYear>2009</GlYear><BeginYearBalance>0.00</BeginYearBalance><ClosingBalPer1>15000.00</ClosingBalPer1><ClosingBalPer2>30000.00</ClosingBalPer2><ClosingBalPer3>30000.00</ClosingBalPer3><ClosingBalPer4>30000.00</ClosingBalPer4><ClosingBalPer5>30000.00</ClosingBalPer5><ClosingBalPer6>30000.00</ClosingBalPer6><ClosingBalPer7>30000.00</ClosingBalPer7><ClosingBalPer8>30000.00</ClosingBalPer8><ClosingBalPer9>30000.00</ClosingBalPer9><ClosingBalPer10>30000.00</ClosingBalPer10><ClosingBalPer11>30000.00</ClosingBalPer11><ClosingBalPer12>30000.00</ClosingBalPer12><ClosingBalPer13>30000.00</ClosingBalPer13><ClosingBalPer14>30000.00</ClosingBalPer14><ClosingBalPer15>0.00</ClosingBalPer15></row><row><CompanyID>0</CompanyID><Company>0 </Company><GlCode>00-1030</GlCode><GlYear>2010</GlYear><BeginYearBalance>30000.00</BeginYearBalance><ClosingBalPer1>30000.00</ClosingBalPer1><ClosingBalPer2>30000.00</ClosingBalPer2><ClosingBalPer3>30000.00</ClosingBalPer3><ClosingBalPer4>30000.00</ClosingBalPer4><ClosingBalPer5>30000.00</ClosingBalPer5><ClosingBalPer6>30000.00</ClosingBalPer6><ClosingBalPer7>30000.00</ClosingBalPer7><ClosingBalPer8>30000.00</ClosingBalPer8><ClosingBalPer9>30000.00</ClosingBalPer9><ClosingBalPer10>30000.00</ClosingBalPer10><ClosingBalPer11>30000.00</ClosingBalPer11><ClosingBalPer12>30000.00</ClosingBalPer12><ClosingBalPer13>30000.00</ClosingBalPer13><ClosingBalPer14>30000.00</ClosingB</XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</Table>
節點被進一步拆分結果成什麼似乎是固定長度的<Table>
元素。第二個表格節點包含來自第一個表格元素的文本的餘額。
這導致非常不同的XML,我不知道如何解決這個問題,看似非結構化,XML在未來Flowgear節點(我的XSLT轉換)
請幫助...爲什麼發生這種情況,我該如何讓它停止?
rtfm,我猜? ;-) –