有关错误的一般问题:XML文档中存在错误(12、34). [英] General question about error: There is an error in XML document (12, 34).

查看:96
本文介绍了有关错误的一般问题:XML文档中存在错误(12、34).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个读取用户发送给我的XML文件的应用程序.在某些情况下,我会收到错误消息:XML文档中存在错误(12,34).

I am working on an application that reads an XML file sent to me by a user. In several instances I get the error: There is an error in XML document (12,34). 

我已经读过很多关于同一问题的文章,但是所有人都张贴了他们的代码和XML文件,并得到了类似字段X的格式错误"的答案.或诸如此类的非常具体的东西.

I have read many posts about this same issue, but all the people post their code and XML file and get an answer like "field X is in the wrong format" or something very specific like that. 

我要问的是我自己如何解码此错误消息.

What I am asking is how to decode this error message myself.

我认为括号中的2个数字是行号和行上的位置,但通常行中甚至不存在该位置.

I thought the 2 numbers in the parentheses were line number and position on the line, but often the position doesn't even exist on the line.

这听起来也很荒谬,但是您如何计算行数呢?从XML文件的第一行开始?还是第一行保存数据?  您算空白行吗?

Also, this may sound ridiculous, but how do you count the lines? Starting with the very first line in the XML file? Or the first line holding data?  Do you count blank lines?

有时,当我在浏览器或XML记事本中查看XML文件时,没有迹象表明该文件有任何问题.我可以使用一个工具来显示XML文件是否存在问题吗?

And, some of the times when I view the XML file in my browser or XML Notepad, there is no indication there is anything wrong with the file. Is there a tool I can use that will show me if there is a problem in an XML file?

推荐答案

Gretchen,

Gretchen,

要说这是一个"XML文件",老实说,它并没有提供太多帮助.可以通过各种方式进行设置.

To say that it's an "XML file" doesn't shed much light, honestly. It can be set up all sorts of ways.

您可以发布XML(或其中的一部分)吗?

Can you post the XML (or a portion of it)?


这篇关于有关错误的一般问题:XML文档中存在错误(12、34).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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