in reply to Re: RSS Parsing not working on new machine
in thread RSS Parsing not working on new machine

Hrm. Looks like a bunch of related things, for different feeds:
End tag mismatch (generator != ) [Ln: 6, Col: 626215104372244] End tag mismatch (omny:organizationId != ) [Ln: 4, Col: 62621510350181 +2] End tag mismatch (title != ) [Ln: 14, Col: 626215078242148]
As I say, this works elsewhere, and a minimal trial (see elsewhere in this thread) handles the same feeds just fine, so I'm not sure why this is happening, or how to fix it.

Replies are listed 'Best First'.
Re^3: RSS Parsing not working on new machine
by wintermute115 (Acolyte) on Apr 15, 2025 at 12:19 UTC

    Choosing a feed that reports End tag mismatch (ttl != ) [Ln: 5, Col: 575272112746466], line 5 is:

            <ttl>60</ttl>

    That column number is obviously wrong, making me think maybe it's not reading the line breaks properly. But if so, how does it know it's line 5? And XML shouldn't care about line breaks anyway, should it?

    It looks like, in general, it's choking on the first line inside a <channel> that isn't an <atom:link>. But I don't know what that means.

      Having added more error checking to see what's going on with the line it's having trouble with:

      if(!$rss) { print " -- Feed is broken -- \n"; my $error = $parser->errstr; print $error . "\n"; $error =~ /Ln: (\d+),/; my $line = $1 - 1; print "Line $line\n"; my @file_array = split("\n", $feed); print length($file_array[$line]); print $file_array[$line] . "\n"; next FEED; }

      I see:

      -- Feed is broken -- End tag mismatch (ttl != ) [Ln: 5, Col: 642255168120818] Line 4 15 <ttl>60</ttl>

      So what it appears to be seeing in that line matches what I'm seeing in the archived version, which makes sense. It's 15 characters long and not 642255168120818, and definitely has the closing tag. So what's going wrong?