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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:34:09+00:00 2026-05-22T14:34:09+00:00

How do I return all items labeled guid from an XML document? For example:

  • 0

How do I return all items labeled guid from an XML document? For example:

[guid] => http://www.motorauthority.com/blog/1060293_aston-martin-v12-zagato-2011-concorso-deleganza-villa-deste

Here is my code:

$source = 'http://feeds.feedburner.com/motorauthority2?format=xml';
$dom = new DOMDocument();
@$dom->loadHTMLFile($source);
$xml = simplexml_import_dom($dom);
$blog = $xml->xpath("//channel");
print_r($blog);

Here is the output of print_r:

Array
(
    [0] => SimpleXMLElement Object
        (
            [language] => en
            [title] => High Gear Media Network Feed
            [description] => Latest news, reviews, and more from around the High Gear Media network of sites
            [image] => SimpleXMLElement Object
                (
                    [link] => SimpleXMLElement Object
                        (
                        )

                    [url] => http://www.motorauthority.com/images/logo-footer.jpg
                    [title] => MotorAuthority
                )

            [lastbuilddate] => Fri, 20 May 2011 04:55:17 -0400
            [generator] => High Gear Media
            [link] => Array
                (
                    [0] => SimpleXMLElement Object
                        (
                        )

                    [1] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [atom10] => http://www.w3.org/2005/Atom
                                    [rel] => self
                                    [type] => application/rss+xml
                                    [href] => http://feeds.feedburner.com/MotorAuthority2
                                )

                        )

                    [2] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [atom10] => http://www.w3.org/2005/Atom
                                    [rel] => hub
                                    [href] => http://pubsubhubbub.appspot.com/
                                )

                        )

                )

            [info] => SimpleXMLElement Object
                (
                    [@attributes] => Array
                        (
                            [uri] => motorauthority2
                        )

                )

            [explicit] => no
            [subtitle] => Latest news, reviews, and more from around the High Gear Media network of sites
            [meta] => SimpleXMLElement Object
                (
                    [@attributes] => Array
                        (
                            [xhtml] => http://www.w3.org/1999/xhtml
                            [name] => robots
                            [content] => noindex
                        )

                )

            [feedflare] => Array
                (
                    [0] => Subscribe with My Yahoo!
                    [1] => Subscribe with NewsGator
                    [2] => Subscribe with My AOL
                    [3] => Subscribe with Bloglines
                    [4] => Subscribe with Netvibes
                    [5] => Subscribe with Google
                    [6] => Subscribe with Pageflakes
                    [7] => Subscribe with Plusmo
                    [8] => Subscribe with The Free Dictionary
                    [9] => Subscribe with Bitty Browser
                    [10] => Subscribe with NewsAlloy
                    [11] => Subscribe with Live.com
                    [12] => Subscribe with Excite MIX
                    [13] => Subscribe with Attensa for Outlook
                    [14] => Subscribe with Webwag
                    [15] => Subscribe with Podcast Ready
                    [16] => Subscribe with Flurry
                    [17] => Subscribe with Wikio
                    [18] => Subscribe with Daily Rotation
                )

            [item] => Array
                (
                    [0] => SimpleXMLElement Object
                        (
                            [title] => Aston Martin V12 Zagato: 2011 Concorso d'Eleganza Villa d'Este
                            [description] => The weekend is finally upon us and that means the 2011 Concorso d’Eleganza Villa d’Este is kicking off, along with all that comes with it. Yesterday we saw a sneak peek at the new Ferrari Superamerica 45, built under the automaker’s Special Projects division and destined for a home in New York. Today we have another coachbuilt...]]>
                            [pubdate] => Fri, 20 May 2011 04:55:17 -0400
                            [link] => SimpleXMLElement Object
                                (
                                )

                            [guid] => http://www.motorauthority.com/blog/1060293_aston-martin-v12-zagato-2011-concorso-deleganza-villa-deste
  • 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-22T14:34:10+00:00Added an answer on May 22, 2026 at 2:34 pm

    The XPath expression you need is

    /rss/channel/item/guid
    

    Note that simplexml_load_file() can handle a URI. There is no need for going though DOMDocument.

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

Sidebar

Related Questions

I am trying to use Linq2Sql to return all rows that contain values from
Given the following XML, I would like to return all eventtitles where the eventtype
When @RadioServiceGroup is set to NULL, I want to return all the records from
I have 3 tables - Items, Props, Items_To_Props i need to return all items
I need serializeArray() to return all items in the selection box every time and
I want to return all application dates for the current month and for the
If I have a query to return all matching entries in a DB that
Using DQL I want to return all the documents under the Cabinet test .
I would like to use the API to return all tweets that match my
how do i define a named_scope to return all the records that were created

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.