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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:17:42+00:00 2026-05-30T21:17:42+00:00

$xml = simplexml_load_file(URL); $namespaces = $xml->getNamespaces(true); i’m getting the namespaces for like this Array

  • 0
$xml = simplexml_load_file("URL");

$namespaces = $xml->getNamespaces(true);

i’m getting the namespaces for like this

Array
(
    [aaa] => http://www.aaa.com/rss/module/save/1.0.2
    [dc] => http://bbb.org/dc/elements/1.1/
)

i need the name for (aaa,dc)

How to get the namespaces name?

  • 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-30T21:17:43+00:00Added an answer on May 30, 2026 at 9:17 pm
    $xml = simplexml_load_file("URL");
    
    $namespaces = $xml->getNamespaces(true);
    
    // loop through the namespaces and echo them out
    foreach($namespaces as $name => $value)
    {
        echo 'namespace: ' . $name;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want show weather information from xml to this URL: http://www.google.com/ig/api?weather=roma&hl=it using this script:
Simple question for the one who knows the answer... $xml = simplexml_load_file(http://url/path/file.xml); This url
$q = $_GET['q']; // Load and parse the XML document $rss = simplexml_load_file('http://search.twitter.com/search.atom?lang=en&q=$q&rpp=100&page=1'); This
I have created a simple function for fetching xml: function meteor(){ $request_url = http://site.com/xml.xml;
I'm trying to parse this feed: http://musicbrainz.org/ws/1/artist/c0b2500e-0cef-4130-869d-732b23ed9df5?type=xml&inc=url-rels I want to grab the URLs inside
I'm having trouble getting the XML from a file using the simplexml_load_file function. I
I've got the following PHP code: $file = 'http://api.themoviedb.org/2.1/Movie.getInfo/en/xml/937a7e45f8f9e50cdb80e21fa50abc39/6479'; if(!$xml = simplexml_load_file($file)) { exit('Failed
I'm traversing an xml file as below: <?xml version=1.0 encoding=ISO-8859-1?> <wrapper> <site base=http://www.example1.co.uk/ name=example
I am having some problems parsing this piece of XML using SimpleXML. There is
I've been trying to use SimpleXML , but it doesn't seem to like XML

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.