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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:35:06+00:00 2026-05-27T15:35:06+00:00

Alright here the question. This is an example text Nokia 700<span>Stok Kodu: 389952</span> <br><span

  • 0

Alright here the question. This is an example text

Nokia 700<span>Stok Kodu: 389952</span>
<br><span style="background-image:none; margin:0; padding:0; font:14px/18px Arial,Helvetica,sans-serif">Nokia 700 Cep Telefonu PDA, Dokunmatik, Bluetooth, Radyo</span>

I want to get “Nokia 700” which starts with index 0 and ends with <span> and i am able to do it with the way below

var singleNode = myDoc.DocumentNode.SelectSingleNode(srxProductName);
string srProductName = singleNode.InnerHtml.ToString()
    .Substring(0, singleNode.InnerHtml.ToString().IndexOf("<span>"));

The question is i wonder are there any easier or more practical way of doing it.

  • 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-27T15:35:07+00:00Added an answer on May 27, 2026 at 3:35 pm

    If you already have the node containing your text in singleNode, you can just extract the first child node, which should be a text node, and get its value:

    var productName = singleNode.ChildNodes[0].Value;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, hard to phrase an exact title for this question, but here goes... I
Alright, I guess this question has been asked a lot of times here. I
I read this question here: Is there a way to override the empty constructor
Alright, I have some weird behavior and this question goes to the people out
I have touched on this question here , where Christopher gave an answer to
Simple question here... Is it alright in terms of MVC design to observe a
Alright, I presented this question on the MSDN forums but have yet to receive
This question has been asked here in one form or another but not quite
Alright, I'm still a newbie in Perl, so the answer to this question may
Alright, possible a naive question here. I have a service that needs to log

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.