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

  • Home
  • SEARCH
  • 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 8752829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:18:35+00:00 2026-06-13T13:18:35+00:00

I have a functionality like below and getting an error String could not be

  • 0

I have a functionality like below and getting an error String could not be parsed as XML

$category_feed_url = "http://www.news4u.com/blogs/category/articles/feed/";
$file = file_get_contents($category_feed_url);
$xml = new SimpleXMLElement($file);

foreach($xml->channel->item as $feed)
{
  echo $feed->link;
  echo $feed->title;
  ...

why this error has occurred.

  • 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-06-13T13:18:36+00:00Added an answer on June 13, 2026 at 1:18 pm

    The URL points to an HTML document.

    It is possible for a document to be both HTML and XML, but this one isn’t.

    It fails because you are trying to parse not-XML as if it was XML.

    See How to parse and process HTML with PHP? for guidance in parsing HTML using PHP.

    You seem to be expecting an RSS feed though, and that document doesn’t resemble one or reference one. The site looks rather spammy, possibly that URI used to point to an RSS feed but the domain has now fallen to a link farm spammer. If so, you should find an alternative source for the information you were collecting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Application has like below functionality: I have Done to set the Values with
i have DX treeList, it has some functionality like copy, paste, delete and so
I would like to have some functionality by which if I write <textarea maxlength=50></textarea>
I'd like my app to have different functionality depending on whether it launched while
I'd like to achieve this kind of template functionality: Have a template defining header,
I have a few IPython scripts which have redundant functionality. I would like to
I have a class whose functionality I'd like to depend on a set of
I have a C# class that has some functionality that I'd like to allow
I have a screen with pivot functionality, and I'd very much like just one
Im looking for something like a search and replace functionality in Solr. I have

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.