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 9141965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:42:54+00:00 2026-06-17T09:42:54+00:00

I have some RSS that looks like this: <item> <guid isPermaLink=false>2284767032</guid> <title>title goes here…</title>

  • 0

I have some RSS that looks like this:

<item>
<guid isPermaLink="false">2284767032</guid>
<title>title goes here...</title>
<description> Description </description>
<author>author name</author>
<dcterms:valid>start=2012-09-28T17:06:00Z;scheme=W3C-DTF</dcterms:valid>
<media:category scheme="" label="">cat1</media:category>
<media:category scheme="" label="">cat2</media:category>
<media:category scheme="" label="">cat3</media:category>

<media:copyright>Big Company</media:copyright>
<media:keywords>some;keywords;</media:keywords>
<media:group>
<media:content bitrate="643.386" medium="video" duration="72.144" expression="full" fileSize="5802051" framerate="29.97" type="video/x-flv" height="360" url="..." width="640"/>
<media:content bitrate="1242.571" medium="video" duration="72.144" expression="full" fileSize="11205501" framerate="29.97" type="video/x-flv" height="480" url="..." width="854"/>
</media:group>
<link>a234dfasf4f</link>
<plmedia:defaultThumbnailUrl>
  http://url.jpg
</plmedia:defaultThumbnailUrl>
</item>

I’m using the following code to parse it:

  $feed = simplexml_load_file('http://feedurl.com');
  echo "<pre>";
  print_r($feed);
  echo "</pre>";

The problem is that I’m getting all the tags like guid, title, and description, but none of the media:category or media:group or something:anything show up – they are just stripped out.

How can I parse this feed without losing them?

  • 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-17T09:42:55+00:00Added an answer on June 17, 2026 at 9:42 am

    You need to find where the namespaces are defined, and find the string that the namespaces map to. So for example if the media namespace maps to http://example.com/something:

    echo (string)$feed->children('http://example.com/something')->copyright;
    

    Outputs:

    Big Company

    The result of print_r() with SimpleXML does not always give you the full structure, but the elements are there.

    To get the nested elements, try something like:

    foreach($feed->children('http://example.com/something')->group->children('http://example.com/something')->content as $content)
    {
        echo (string)$content->attributes()->bitrate;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a site that is serving some RSS feeds, and we'd like to
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
I have a loose html img tag in some incoming RSS that I am
I see that some rss on xml have strange strings. For example, ... is
I have an RSS feed from Zendesk (http://mysupport.zendesk.com/forums/some-path/posts.rss) that I need to render as
I am displaying some RSS feeds in my site that I have them in
I have a button that presents some RSS news. My problem is that I
i have a rss feed and it seems that has some errors in it:
I'm trying to read some RSS feeds with DOM in PHP like this one:
I have a shared site in sharepoint and have some RSS feed webpart in

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.