pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <bdo id='QnQj4'></bdo><ul id='QnQj4'></ul>
    <i id='QnQj4'><tr id='QnQj4'><dt id='QnQj4'><q id='QnQj4'><span id='QnQj4'><b id='QnQj4'><form id='QnQj4'><ins id='QnQj4'></ins><ul id='QnQj4'></ul><sub id='QnQj4'></sub></form><legend id='QnQj4'></legend><bdo id='QnQj4'><pre id='QnQj4'><center id='QnQj4'></center></pre></bdo></b><th id='QnQj4'></th></span></q></dt></tr></i><div class="r1j7h7r" id='QnQj4'><tfoot id='QnQj4'></tfoot><dl id='QnQj4'><fieldset id='QnQj4'></fieldset></dl></div>
  • <tfoot id='QnQj4'></tfoot>

    1. <legend id='QnQj4'><style id='QnQj4'><dir id='QnQj4'><q id='QnQj4'></q></dir></style></legend>

    2. <small id='QnQj4'></small><noframes id='QnQj4'>

        XML Parsing - Illegal XML Character(在執行存儲過程時,

        XML Parsing - Illegal XML Character (when executing stored procedure, running procedure queries results in no errors)(XML Parsing - Illegal XML Character(在執行存儲過程時,運行過程查詢不會導致錯誤)) - IT屋-程序員軟件
          <bdo id='k2ilB'></bdo><ul id='k2ilB'></ul>

              <small id='k2ilB'></small><noframes id='k2ilB'>

              <i id='k2ilB'><tr id='k2ilB'><dt id='k2ilB'><q id='k2ilB'><span id='k2ilB'><b id='k2ilB'><form id='k2ilB'><ins id='k2ilB'></ins><ul id='k2ilB'></ul><sub id='k2ilB'></sub></form><legend id='k2ilB'></legend><bdo id='k2ilB'><pre id='k2ilB'><center id='k2ilB'></center></pre></bdo></b><th id='k2ilB'></th></span></q></dt></tr></i><div class="bxvpxj5" id='k2ilB'><tfoot id='k2ilB'></tfoot><dl id='k2ilB'><fieldset id='k2ilB'></fieldset></dl></div>
                <tbody id='k2ilB'></tbody>

                1. <tfoot id='k2ilB'></tfoot><legend id='k2ilB'><style id='k2ilB'><dir id='k2ilB'><q id='k2ilB'></q></dir></style></legend>
                  本文介紹了XML Parsing - Illegal XML Character(在執行存儲過程時,運行過程查詢不會導致錯誤)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個有效的 XML 文檔(已使用多個 XML 驗證器進行確認,包括在線驗證器和 Sublime Text XML 驗證器插件).

                  嘗試使用名為 ImportNXML 的存儲過程將 XML 文檔導入 MSSQL 2008 時收到以下錯誤(命令:exec [dbo].[ImportNXML];)

                  I have a valid XML document (this has been confirmed using multiple XML validators including online validators and the Sublime Text XML validator plugin).

                  I receive the following error when attempting to import the XML document into MSSQL 2008 using a stored procedure named ImportNXML (command: exec [dbo].[ImportNXML];)

                  Msg 9420, Level 16, State 1, Line 2
                  XML parsing: line 17, character 35, illegal xml character
                  

                  我已經確認 XML 文檔中沒有非法字符,第 17 行,字符 35 只是數字 1.我嘗試修改這一行,用字母替換整行,用單個數字替換整行,在此行之前用字母/數字填充文檔中的其他行,但我收到完全相同的錯誤,抱怨完全相同的位置.

                  如果我打開 ImportNXML 存儲過程并運行查詢內容,我根本不會收到任何錯誤.

                  什么可能導致存儲過程在使用 'exec' 命令執行時失敗,但在過程內容作為擴展查詢執行時會成功?

                  前17行的mock數據如下:

                  I have confirmed no illegal characters are in the XML document and line 17, character 35 is just the number 1. I've tried modifying this line, replacing the entire line with letters, replacing the entire line with a single number, padding other lines in the document before this line with letters/numbers, but i receive exactly the same error complaining about the exact same location.

                  If i open the ImportNXML stored procedure and run the query contents, i receive no errors at all.

                  What could be causing the stored procedure to fail when being executed using the 'exec' command but succeed when the procedure contents are executed as an expanded query?

                  Mock data for the first 17 lines is as follows:

                  <?xml version="1.0" ?>
                  <ClientData>
                  <Policy><policyName>The Policy Name</policyName>
                  <Preferences><ServerPreferences><preference><name>Sessions</name>
                  <value>3</value>
                  </preference>
                  <preference><name>Detection</name>
                  <value>yes</value>
                  </preference>
                  <preference><name>Mac</name>
                  <value>no</value>
                  </preference>
                  <preference><name>Plugin</name>
                  <value>108478;84316;32809;93635;36080;87560;61117;35292;75260;83156;61271;103773;12899;82513;56376;77796;85655;60338;56763;79951;</value>
                  </preference>
                  <preference><name>TARGET</name>
                  <value>123.123.123.123,234.234.234.234</value>
                  

                  導入 XML 的存儲過程的部分如下:

                  The portion of the stored proc that imports the XML is as follows:

                  EXEC(' INSERT INTO XmlImportTest(xmlFileName, xml_data) SELECT ''' + @importPath + ''', xmlData FROM ( SELECT * FROM OPENROWSET (BULK ''' + @importPath + ''' , SINGLE_BLOB) AS XMLDATA ) AS FileImport (XMLDATA) ') 
                  

                  推薦答案

                  純猜測:

                  • 該文件是 utf-8 編碼的(或任何其他編碼,SQL-Server 2008 無法本地讀取).
                    • 您必須知道,SQL-Server 的文件編碼相當有限.CHAR(或VARCHAR)是擴展的ASCII 1字節編碼NCHAR(或NVARCHAR)code>) 是 UCS-2 2 字節編碼(與 UTF-16 幾乎相同).
                    • 在 SQL-Server 2016(以及 v2014 的 SP2)中引入了一些進一步的支持,尤其是對 utf-8 的支持.
                    • 嘗試使用適當的編輯器(例如記事本++)打開您的 XML 并嘗試找出文件的編碼.嘗試將其保存為unicode/UCS-2/utf-16"并重試導入.
                    • 嘗試使用 CLOB 而不是 BLOB 的導入.以二進制LargeObject 形式讀取文件將一個接一個地讀取字節.SQL-Server 將嘗試將這些字節讀取為每個字符固定大小的字符串.字符 LOB 可能在特殊情況下起作用.
                    • 檢查BOM(字節順序標記)的前兩個字節
                    • The file is utf-8 encoded (or any other encoding, SQL-Server 2008 cannot read natively).
                      • You must know, that SQL-Server is rather limited with file encodings. CHAR (or VARCHAR) is extended ASCII 1-byte encoding and NCHAR (or NVARCHAR) is UCS-2 2-byte encoding (which is almost identical with UTF-16).
                      • With SQL-Server 2016 (and SP2 for v2014) some further support was introduced, especially for utf-8.
                      • Try to open your XML with an appropriate editor (e.g. notepad++) and try to find out the file's encoding. Try to save this as "unicode / UCS-2 / utf-16" and retry the import.
                      • Try to use your import with CLOB instead of BLOB. Reading the file as binary LargeObject will take the bytes one after the next. SQL-Server will try to read these bytes as string with fixed size per character. A character LOB might work under special circumstances.
                      • Check the first two bytes for a BOM (byte order mark)
                      • 使用十六進制編輯器打開文件并嘗試查找奇怪的代碼
                      • 在這種情況下,有時您會遇到截斷或斷行引號
                      • 如果您導入數據并且預計會出現問題,強烈建議使用兩步法
                      • 將您的文件讀入一個容忍臨時表(使用NVARCHAR(MAX) 甚至VARBIANRY(MAX) 目標列)并嘗試繼續這個.
                      • 在導入之前可能需要使用其他工具來更改您的文件.
                      • If you import data and you expect issues it is highly recommended to use a 2-step-approach
                      • Read your file into a tolerant staging table (with NVARCHAR(MAX) or even VARBIANRY(MAX) target columns) and try to continue with this.
                      • It might be necessary to use another tool to change your file before the import.

                      這篇關于XML Parsing - Illegal XML Character(在執行存儲過程時,運行過程查詢不會導致錯誤)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                      【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數據庫列表和 SQL Server 實例使用的空間嗎?) - IT屋-程序員軟件開發
                  How to create a login to a SQL Server instance?(如何創建對 SQL Server 實例的登錄?)
                  How to know the version and edition of SQL Server through registry search(如何通過注冊表搜索知道SQL Server的版本和版本)
                  Why do I get a quot;data type conversion errorquot; with ExecuteNonQuery()?(為什么會出現“數據類型轉換錯誤?使用 ExecuteNonQuery()?)
                  How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                  WinForms application design - moving documents from SQL Server to file storage(WinForms 應用程序設計——將文檔從 SQL Server 移動到文件存儲)

                  <small id='BlHh3'></small><noframes id='BlHh3'>

                    <bdo id='BlHh3'></bdo><ul id='BlHh3'></ul>

                    1. <i id='BlHh3'><tr id='BlHh3'><dt id='BlHh3'><q id='BlHh3'><span id='BlHh3'><b id='BlHh3'><form id='BlHh3'><ins id='BlHh3'></ins><ul id='BlHh3'></ul><sub id='BlHh3'></sub></form><legend id='BlHh3'></legend><bdo id='BlHh3'><pre id='BlHh3'><center id='BlHh3'></center></pre></bdo></b><th id='BlHh3'></th></span></q></dt></tr></i><div class="5hbjzl7" id='BlHh3'><tfoot id='BlHh3'></tfoot><dl id='BlHh3'><fieldset id='BlHh3'></fieldset></dl></div>
                      <tfoot id='BlHh3'></tfoot>

                            <tbody id='BlHh3'></tbody>

                            <legend id='BlHh3'><style id='BlHh3'><dir id='BlHh3'><q id='BlHh3'></q></dir></style></legend>

                            主站蜘蛛池模板: 超声波清洗机-超声波清洗设备定制生产厂家 - 深圳市冠博科技实业有限公司 | 大功率金属激光焊接机价格_不锈钢汽车配件|光纤自动激光焊接机设备-东莞市正信激光科技有限公司 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | PVC地板|PVC塑胶地板|PVC地板厂家|地板胶|防静电地板-无锡腾方装饰材料有限公司-咨询热线:4008-798-128 | 宜兴市恺瑞德环保科技有限公司 | GAST/BRIWATEC/CINCINNATI/KARL-KLEIN/ZIEHL-ABEGG风机|亚喜科技 | 智慧消防-消防物联网系统云平台| 首页-恒温恒湿试验箱_恒温恒湿箱_高低温试验箱_高低温交变湿热试验箱_苏州正合 | 东莞工厂厂房装修_无尘车间施工_钢结构工程安装-广东集景建筑装饰设计工程有限公司 | 危废处理系统,水泥厂DCS集散控制系统,石灰窑设备自动化控制系统-淄博正展工控设备 | LED投光灯-工矿灯-led路灯头-工业灯具 - 山东普瑞斯照明科技有限公司 | 连续密炼机_双转子连续密炼机_连续式密炼机-南京永睿机械制造有限公司 | 杭州双螺杆挤出机-百科 | 塑胶跑道施工-硅pu篮球场施工-塑胶网球场建造-丙烯酸球场材料厂家-奥茵 | 小港信息港-鹤壁信息港 鹤壁老百姓便民生活信息网站 | 郑州水质检测中心_井水检测_河南废气检测_河南中环嘉创检测 | 沈飞防静电地板__机房地板-深圳市沈飞防静电设备有限公司 | 全自动烧卖机厂家_饺子机_烧麦机价格_小笼汤包机_宁波江北阜欣食品机械有限公司 | 综合管廊模具_生态,阶梯护坡模具_检查井模具制造-致宏模具厂家 | 广东佛电电器有限公司|防雷开关|故障电弧断路器|智能量测断路器 广东西屋电气有限公司-广东西屋电气有限公司 | 合肥风管加工厂-安徽螺旋/不锈钢风管-通风管道加工厂家-安徽风之范 | 专注提供国外机电设备及配件-工业控制领域一站式服务商-深圳市华联欧国际贸易有限公司 | 集装箱标准养护室-集装箱移动式养护室-广州璟业试验仪器有限公司 | 真空上料机(一种真空输送机)-百科| 合肥汽车充电桩_安徽充电桩_电动交流充电桩厂家_安徽科帝新能源科技有限公司 | 广州企亚 - 数码直喷、白墨印花、源头厂家、透气无手感方案服务商! | 云南成考网_云南成人高考报名网 粤丰硕水性环氧地坪漆-防静电自流平厂家-环保地坪涂料代理 | 液压扳手-高品质液压扳手供应商 - 液压扳手, 液压扳手供应商, 德国进口液压拉马 | 量子管通环-自清洗过滤器-全自动反冲洗过滤器-北京罗伦过滤技术集团有限公司 | 上海单片机培训|重庆曙海培训分支机构—CortexM3+uC/OS培训班,北京linux培训,Windows驱动开发培训|上海IC版图设计,西安linux培训,北京汽车电子EMC培训,ARM培训,MTK培训,Android培训 | 沈阳网站建设_沈阳网站制作_沈阳网页设计-做网站就找示剑新零售 沈阳缠绕膜价格_沈阳拉伸膜厂家_沈阳缠绕膜厂家直销 | 安徽华耐泵阀有限公司-官方网站| SOUNDWELL 编码器|电位器|旋转编码器|可调电位器|编码开关厂家-广东升威电子制品有限公司 | 阴离子_阳离子聚丙烯酰胺厂家_聚合氯化铝价格_水处理絮凝剂_巩义市江源净水材料有限公司 | 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 南京PVC快速门厂家南京快速卷帘门_南京pvc快速门_世界500强企业国内供应商_南京美高门业 | 泵阀展|阀门展|水泵展|流体机械展 -2025上海国际泵管阀展览会flowtech china | 餐饮加盟网_特色餐饮加盟店_餐饮连锁店加盟 | Dataforth隔离信号调理模块-信号放大模块-加速度振动传感器-北京康泰电子有限公司 | 高低温万能试验机-复合材料万能试验机-馥勒仪器 | 气动隔膜泵-电动隔膜泵-循环热水泵-液下排污/螺杆/管道/化工泵「厂家」浙江绿邦 | 南溪在线-南溪招聘找工作、找房子、找对象,南溪综合生活信息门户! |