I've got the following error sometimes when I'm try to parse a XML file with Java (within GAE server):
Parse: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3; The element type "META" must be terminated by the matching end-tag "</META>".
Yet it is not happening all the time, sometimes It's works alright. The program parsing xml files and I've no problem with them.
This is the XML file I'm trying to parse: http://www.fulhamchronicle.co.uk/london-chelsea-fc/rss.xml
Any help will be appreciated. Thanks.
Update:
Thanks for the answer. I changed my code to a different parser and the good news the file is now parsing correctly. The bad it now moved for another feed same problem, same line despite completely different feed and it worked perfectly before. Could anyone think of why it's happening?
You can try
<meta/>
instead of<meta>
.That looks like it is a live document; i.e. one that changes fairly frequently. There is also no sign of a
<meta>
tag in it.I can think of two explanations for what is happening:
Sometimes the document is being generated or created incorrectly.
Sometimes you are getting an HTML error page instead of the document you are expecting, and the XML parser can't cope with a
<meta>
tag in the HTML's<head>
. That is because the<meta>
tag in (valid) HTML does not need to have a matching / closing</meta>
tag. (And for at least some versions of HTML, it is not allowed to have a closing tag.)To track this down, you are going to have to capture the precise input that is causing the parse to fail.
can you use this tag
It is not XML but HTML:
The XML parser will not parse it.
I see the file hasn't any content and it doesn't look like valid RSS file. May be any server-side error occurs.