无法在 XML 中找到未关闭的元素 [英] Can't find unclosed element in XML

查看:37
本文介绍了无法在 XML 中找到未关闭的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的 XML 文件(~18MB).显然,其中某处有一个未关闭的标签.我知道这是因为当我运行 W3C 标记验证工具 (validator.w3.org) 时,我收到以下错误:

I have a large XML file (~18MB). Apparently there is a tag somewhere in it that isn't closed. I know this because when I ran the W3C markup validation tool (validator.w3.org), I get the following error:

您可能忽略了关闭一个元素,或者您可能打算自关闭"一个元素,即以/>"结尾而不是>".

我的问题是如何在文件的 500,000 行中找到这个丢失的封闭元素.有没有我可以使用的工具来建议可能存在问题的地方 - 例如在一定数量的行后尚未关闭的元素?

My question is how I might go about finding this missing closed element among the 500,000 lines in the file. Is there a tool I could use that would suggest places where there might be a problem -- such as an element that has not been closed after a certain number of lines?

任何想法将不胜感激.

推荐答案

我使用 Notepad++一个优秀的 XML 工具插件,可让您检查 XML 语法并带您到有问题的行.它还具有有用的实用程序.

I use Notepad++ which has an excellent XML Tools plugin that lets you check XML Syntax and takes you to the line that is problematic. It also has useful utilities.

这篇关于无法在 XML 中找到未关闭的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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