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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:47:31+00:00 2026-06-10T17:47:31+00:00

i need help with the xpath query to extract the title text and thumbnail

  • 0

i need help with the xpath query to extract the title text and thumbnail url of each entry in the following rss results

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/'>
<entry>
<title>LiveFit Augusta - "Gym Time"</title>
<media:group>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/default.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/mqdefault.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/hqdefault.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/1.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/2.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/Ig7CcLCR2n4/3.jpg'/>
</media:group>
</entry>
<entry>
<title>LiveFit Augusta - "Everyday Joes &amp; Janes"</title>
<media:group>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/default.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/mqdefault.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/hqdefault.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/1.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/2.jpg'/>
<media:thumbnail url='http://i.ytimg.com/vi/REhn9jjjV7Q/3.jpg'/>
</media:group>
</entry>
</feed>

the title

< title type=’text’>Evolution of Dance< /title>

or

< media:title type=’plain’>Evolution of Dance< /media:title>

thumbnail

<media:thumbnail 
      url='http://img.youtube.com/vi/dMH0bHeiRNg/1.jpg' height='97' width='130' 
      time='00:01:30'/>

EDIT

here is the code am using

Dim xmlDoc As MSXML2.DOMDocument30
Dim xmlNode As MSXML2.IXMLDOMNode
Dim xmlEntryNodes As IXMLDOMNodeList
Dim ns As String
Set xmlDoc = New DOMDocument30
ns = "xmlns:x='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/'"
    xmlDoc.setProperty "SelectionLanguage", "XPath"
    xmlDoc.setProperty "SelectionNamespaces", ns

If xmlDoc.loadXML(xmlText) = False Then
  Exit Function
End If

Set xmlEntryNodes = xmlDoc.documentElement.selectNodes("/feed/entry")

debug.print xmlEntryNodes.Length returns 0

  • 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-10T17:47:32+00:00Added an answer on June 10, 2026 at 5:47 pm

    Use:

    ns = “xmlns:x=’http://www.w3.org/2005/Atom’ xmlns:media=’http://search.yahoo.com/mrss/'”

    doc.SetProperty(“SelectionNamespaces”, ns)

    And then use an XPath expression like this:

    /*/x:entry/x:title[. = 'Evolution of Dance']
    

    and this:

    /*/x:entry/media:group/media:thumbnail[@url='http://img.youtube.com/vi/dMH0bHeiRNg/1.jpg']
    

    Learn more about the SetProperty() function here:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms756048(v=vs.85).aspx

    Alternatively, if you don’t want to register namespaces, you may use less-readable expressions like these:

    /*/*[name()='entry']/*[name()='title'][. = 'Evolution of Dance']
    

    and this:

    /*/*[name()='entry']
           /*[name()='media:group']
               /*[name()='media:thumbnail']
                     [@url='http://img.youtube.com/vi/dMH0bHeiRNg/1.jpg']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i need help to extract information from XML with xpath. I will use
I need help with the following issue. I parse XML and do a XSLT
I need some help with my xpath query. I can get this code to
I'm a bit of a newbie to XPath, so I need some help figuring
Need help with a query that I wrote: I have three tables Company id
need help/guide for sql select query, I have 2 table stock and stock_history, in
AT 380509 T 20071215 For the above xml file, i need the xpath to
I need help with this. I am new to using XPath in javascript and
I need help with some XPath. Say I am working on XHTML. How do
I need help doing a few things with XPath in PHP. With any given

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.