Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7508211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:38:26+00:00 2026-05-29T22:38:26+00:00

This has become a real pain in my backside. The URL I’m trying to

  • 0

This has become a real pain in my backside.

The URL I’m trying to parse is http://torrentz.eu/feed_verifiedP?q=ubuntu

Here’s a short version of the xml:

<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>Torrentz - ubuntu</title>
  <link>http://torrentz.eu/verified?q=ubuntu</link>
  <description>ubuntu search</description>
  <language>en-us</language>
  <atom:link href="http://torrentz.eu/feed_verifiedP?q=ubuntu" rel="self" type="application/rss+xml" />
  <item>
     <title>ubuntu 11 10 desktop i386 iso</title>
     <link>http://torrentz.eu/8ac3731ad4b039c05393b5404afa6e7397810b41</link>
     <guid>http://torrentz.eu/8ac3731ad4b039c05393b5404afa6e7397810b41</guid>
     <pubDate>Thu, 13 Oct 2011 15:02:06 +0000</pubDate>
     <category>apps linux applications os software</category>
     <description>Size: 695 MB Seeds: 4,613 Peers: 161 Hash: 8ac3731ad4b039c05393b5404afa6e7397810b41</description>
  </item>
 </channel>
</rss>

My code:

    SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    XMLReader xr = sp.getXMLReader();

    //Get Torrents
    XMLTorrentsRSSHandler torrentsHandler = new XMLTorrentsRSSHandler();
    xr.setContentHandler(torrentsHandler);
    InputStream in = url.openStream();
    xr.parse(new InputSource(in));
    XMLTorrentsRSSParsedDataSet parsedTorrentsDataSet = torrentsHandler.getParsedData();

I keep getting this exception:

org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 53: mismatched tag

Why the flip does it torment me like this!?

EDIT: This method was working fine until today. Perhaps the website changed but where is this flippin’ mismatched tag?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:38:27+00:00Added an answer on May 29, 2026 at 10:38 pm

    Why do you have Harmony on your build path? Your code works fine with the built-in SAXParser in Oracle’s JDK7u3. If there isn’t a reason to be using the harmony implementation, you should revert to the standard one.

    Testcase form:

    import java.io.IOException;
    import java.io.StringReader;
    
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.DefaultHandler;
    
    class Scratch {
        public static void main(String[] args) throws IOException, SAXException, ParserConfigurationException {
            final String document = "<?xml version=\"1.0\"?>\n" +
                    "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n" +
                    " <channel>\n" +
                    "  <title>Torrentz - ubuntu</title>\n" +
                    "  <link>http://torrentz.eu/verified?q=ubuntu</link>\n" +
                    "  <description>ubuntu search</description>\n" +
                    "  <language>en-us</language>\n" +
                    "  <atom:link href=\"http://torrentz.eu/feed_verifiedP?q=ubuntu\" rel=\"self\" type=\"application/rss+xml\" />\n" +
                    "  <item>\n" +
                    "     <title>ubuntu 11 10 desktop i386 iso</title>\n" +
                    "     <link>http://torrentz.eu/8ac3731ad4b039c05393b5404afa6e7397810b41</link>\n" +
                    "     <guid>http://torrentz.eu/8ac3731ad4b039c05393b5404afa6e7397810b41</guid>\n" +
                    "     <pubDate>Thu, 13 Oct 2011 15:02:06 +0000</pubDate>\n" +
                    "     <category>apps linux applications os software</category>\n" +
                    "     <description>Size: 695 MB Seeds: 4,613 Peers: 161 Hash: 8ac3731ad4b039c05393b5404afa6e7397810b41</description>\n" +
                    "  </item>\n" +
                    " </channel>\n" +
                    "</rss>\n";
    
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp = spf.newSAXParser();
            XMLReader xr = sp.getXMLReader();
    
            ContentHandler torrentsHandler = new DefaultHandler() {
                @Override
                public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
                    System.out.printf("%s / %s / %s\n", uri, localName, qName);
                }
            };
            xr.setContentHandler(torrentsHandler);
            xr.parse(new InputSource(new StringReader(document)));
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this has been an ongoing problem with me, ive been trying to make a
this has baffled me for a couple of hours now. Why do i get
This has been a massive headache. We use Ning as a our platform for
This has been frustrating me for a while now. I started developing a site
This has probably something to do with my transformations, but right now I can't
This has defeated me. I want to have a static class variable which is
This has bothered me for a while. I use `hi-lock' or more specifically highlight-symbol
This has been a rather problematic issue on numerous occasions. We have alot of
This has to be a frequent question, but not on SO yet, so it
This has happened before to me, but I can't remember how I fixed it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.