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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:28:05+00:00 2026-05-31T22:28:05+00:00

below is the chunk of XML i get as input and i need to

  • 0

below is the chunk of XML i get as input and i need to select the phone number found in the (732) 462-13112 node if the span in this sample code fed.com is empty.

i am starting off with xpath to ferret out the only certainty i see in the XML and that is “//nobr” how can i navigate down to the span containing ted.com and test to see if there is anything present?

<div> 
    <div></div>
    <span class="pp-headline-item pp-headline-phone"> 
        <span class="telephone" dir="ltr"> 
            <nobr>(732) 462-1311</nobr> 
            <span class="pp-headline-phone-label" style="display:none">()</span>
        </span>&#8206;
    </span>  
    <span> &middot; </span> 
    <span class="pp-headline-item pp-headline-authority-page"> 
        <span>
            <a href="http://maps.google.com/local_url?q=http://www.federicis.com/&amp;dq=07746+pizza">
                <span>fed.com</span>
            </a>
        </span> 
    </span>  
</div>
  • 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-31T22:28:06+00:00Added an answer on May 31, 2026 at 10:28 pm

    If I understand your question correctly, you can use the following:

    /div[//a//span[not(text())]]//nobr/text()
    

    This will return the phone number found in nobr if the span containing fed.com is empty, otherwise it will return an empty string.

    Edit:

    If you have multiple a tags under the main div, you can use this to extract the specific span:

    //a//span[@class='pp-headline-item pp-headline-authority-page']//a/span[not(text())]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a chunk of HTML/JavaScript with the below code: $result = mysql_query(SELECT
I will be using some jQuery below this chunk of code (which I may
Below is the beginning of a chunk of SPIM code: .data a: .space 20
I figured enough jQuery to select this chunk out of a huge HTML document.
Why does the code below not produce an identical output file to the input
In below codes, std::map<Key,Int>::iterator p; p = randomTable[chunk].find(value); if (p != randomTable[chunk].end()) { }
whats the SQL for selecting the values from this XML chunk like done in
I have a chunk of data from which I need to extract some strings
I am currently using the below code to get a list of uuid's then
I have an area where a chunk of HTML (shown below) is added dynamically

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.