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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:12:48+00:00 2026-05-31T21:12:48+00:00

in the application simplexml has been converting an rss feed to an object and

  • 0

in the application simplexml has been converting an rss feed to an object and the elements have been extremely easy to reference. are prefixed elements (eg <this:that> )referenced the same way as a non prefixed element($item->this) in the object.

I have found no information in the manual on php.net.

  • 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-31T21:12:49+00:00Added an answer on May 31, 2026 at 9:12 pm

    Not quite. When you do a print_r() or var_dump() of an object representing namespaced XML you’ll notice all the namespaced nodes are missing. There are a few ways to get namespaced nodes. One way is using registerXPathNamespace() in conjunction with xpath():

    $xml = simplexml_load_file('some/namespaced/xml/file.xml');
    $xml->registerXPathNamespace('prefix', 'http://Namespace/Uri/Here');
    $xml->xpath('//prefix:node'); //get all <prefix:node> XML nodes.
    

    Another way is to use children() to get child nodes:

    $xml = simplexml_load_file('some/namespaced/xml/file.xml');
    $xml->children('prefix', true); //get all nodes with the 'prefix' prefix that are direct descendants of the root node.
    $xml->someNode->children('blah', true); //get all nodes with the 'blah' prefix that are direct descendants of <someNode>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my RSS template that I load into my simplexml object. I want
Application has an auxiliary thread. This thread is not meant to run all the
I have been trying for about a day now to get an xml feed
So infuriating, I can hardly talk. I've assembled an RSS feed with SimpleXML and
I'm creating an RSS feed for a site. I am using SimpleXML to create
I'm really interested in numerical analysis. I have been using DotNumerics Open Source Application.
Application use NHibernate. I Have object A that contains set of objects B. I
In my application I have two pages. Index and engine. Index has mostly jQuery
I've been trying to access some XML, which looks like this: <feed xmlns:s=http://syndication.nhschoices.nhs.uk/services xmlns=http://www.w3.org/2005/Atom>
I'm currently working on an application that uses php's simplexml to interpret rss feeds

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.