加载xml文档时出现系统错误 [英] System error when loading xml document
问题描述
你好,
当我使用LoadXml函数加载XML文档时,我得到一个系统
错误。提出异常。
是什么原因造成的? XML文档是有效的。
问候
Simon Jefferies
工具程序员,Headfirst Productions
mailto:si **** @ headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
Simon Jefferies写道:
当我使用LoadXml函数加载XML文档,我得到一个系统
错误。提出异常。
是什么原因引起的? XML文档是有效的。
LoadXml根本没有验证,所以有效性不相关。
我想你没有得到任何尝试使用LoadXml
的系统错误,但具有特定的输入字符串参数。如果
它很短或者可能把它放在一个文本文件中,你可以把它上传到
服务器并发布URL吗?
还告诉我们您使用的是.NET 1.0还是1.1。
-
Martin Honnen
http://JavaScript.FAQTs.com/
Simon Jefferies写道:
当我使用LoadXml函数加载XML文档时,我得到一个系统
错误提出异常。
是什么原因引起的? XML文档是有效的。
LoadXml根本没有验证,所以有效性不相关。
我想你没有得到任何尝试使用LoadXml
的系统错误,但具有特定的输入字符串参数。如果
它很短或者可能把它放在一个文本文件中,你可以把它上传到
服务器并发布URL吗?
还告诉我们您使用的是.NET 1.0还是1.1。
-
Martin Honnen
http://JavaScript.FAQTs.com/
您好Simon,
我已经测试了您提供的Xml文件。似乎原因只是
XML文件无效事件格式不正确。通常,我们可以先在IE浏览器中打开一个
xml文件,看看它是否可以正确显示,以确认它是否格式正确。
#检查形成良好且有效的XML
http://msdn.microsoft.com/library/en...ngforwell-form
edvalidxml.asp?frame = true
#使用XmlTextWriter创建良好的XML
http://msdn.microsoft.com/library/en...-FormedXMLCrea
tionWithXmlTextWriter.asp?frame = true
之后我们可以使用api来处理XML文档。我在此消息中附加了
修改的Xml文件。请检查一下它是否有效。
有效。谢谢。
问候,
Steven Cheng
微软在线支持
安全! www.microsoft.com/security
(此帖子按原样提供,不作任何保证,并且不授予
权利。)
在ASP.NET上获取预览whidbey
< a rel =nofollowhref =http://msdn.microsoft.com/asp.net/whidbey/default.aspxtarget =_ blank> http://msdn.microsoft.com/asp.net/whidbey /default.aspx
Hello,
When I load an XML document using the LoadXml function, I get a "System
error" exception raised.
What causes this? the XML document is valid.
Regards
Simon Jefferies
Tools Programmer, Headfirst Productions
mailto:si****@headfirst.co.uk
www.callofcthulhu.com www.deadlandsgame.com
-
Simon Jefferies wrote:
When I load an XML document using the LoadXml function, I get a "System
error" exception raised.
What causes this? the XML document is valid.
LoadXml doesn''t validate at all so validity is not relevant.
I guess you do not get the System error with any attempt to use LoadXml
but with a specific input string parameter. Could you post that here if
it is short or otherwise maybe put it in a text file, upload that to a
server and post the URL?
Also tell us whether you are using .NET 1.0 or 1.1.
--
Martin Honnen
http://JavaScript.FAQTs.com/
Simon Jefferies wrote:
When I load an XML document using the LoadXml function, I get a "System
error" exception raised.
What causes this? the XML document is valid.
LoadXml doesn''t validate at all so validity is not relevant.
I guess you do not get the System error with any attempt to use LoadXml
but with a specific input string parameter. Could you post that here if
it is short or otherwise maybe put it in a text file, upload that to a
server and post the URL?
Also tell us whether you are using .NET 1.0 or 1.1.
--
Martin Honnen
http://JavaScript.FAQTs.com/
Hi Simon,
I''ve test the Xml file you provided. It seems that the cause is just the
XML file is not valid event not well-formed. Generally, we can first open a
xml file in IE browser to see whether it can be correctly displayed so as
to confirm whether it is well-formed.
#Checking for Well-Formed and Valid XML
http://msdn.microsoft.com/library/en...ngforwell-form
edvalidxml.asp?frame=true
#Well-Formed XML Creation with the XmlTextWriter
http://msdn.microsoft.com/library/en...-FormedXMLCrea
tionWithXmlTextWriter.asp?frame=true
After that we can use api to processing the XML document. I''ve attached the
modified Xml file in this message. Please have a check to see whether it
works. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
这篇关于加载xml文档时出现系统错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!