获取所有xml解析错误 [英] Getting all of xml parse error

查看:87
本文介绍了获取所有xml解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



您好!


这里是关于MSXML的问题。


<我有Windows XP,IE6和MSXML6.0 SP2。


我正在开发一个应用程序,它根据XML模式验证XML文件(手写)等等。


我希望得到所有xml解析错误的列表(尤其是错误代码和消息)。


告诉我如何获取列表或如何故意提出错误。


我使用JScript.NET。

解决方案

MSXML提供
parseError属性

验证函数
,它返回XML文件的解析错误。 ParseError对象包含错误信息,例如错误代码,原因,行的位置和发生错误的文件等。这是您要找的吗?


Hello!

Here is a question about MSXML.

I have Windows XP, IE6 and MSXML6.0 SP2.

I'm developing an application which validates XML files(hand written) against a XML schema and so on.

I would like to get the list of all xml parse errors(especially error codes and messages).

Tell me how to get the list or how to raise errors intentionally.

I use JScript.NET.

解决方案

MSXML provides parseError property and validate function that returns parse errors for XML files. ParseError object contains error information such as error code, reason, position of the line and file where the error happens, etc. Is this what you are looking for?


这篇关于获取所有xml解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆