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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:38:39+00:00 2026-05-25T01:38:39+00:00

I have this text in a rich text box named richTextBox : <notification_counts> <unseen>0</unseen>

  • 0

I have this text in a rich text box named richTextBox:

    <notification_counts>
    <unseen>0</unseen>
  </notification_counts>
  <friend_requests_counts>
    <unread>1</unread>
    <unseen>**0**</unseen>
  </friend_requests_counts>

I would like to extract the value from the unseen tag (0 in this example) and place it in the text box named textbox1. How should I go about doing this?

Full code

<?xml version="1.0" encoding="UTF-8"?>
<notifications_get_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">
  <messages>
    <unread>0</unread>
    <unseen>0</unseen>
    <most_recent>****</most_recent>
  </messages>
  <pokes>
    <unread>0</unread>
    <most_recent>0</most_recent>
  </pokes>
  <shares>
    <unread>0</unread>
    <most_recent>0</most_recent>
  </shares>
  <notification_counts>
    <unseen>0</unseen>
  </notification_counts>
  <friend_requests_counts>
    <unread>1</unread>
    <unseen>0</unseen>
  </friend_requests_counts>
  <friend_requests list="true">
    <uid>***</uid>
  </friend_requests>
  <group_invites list="true"/>
  <event_invites list="true"/>
</notifications_get_response>
  • 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-25T01:38:40+00:00Added an answer on May 25, 2026 at 1:38 am

    If your rich text box only contains XML markup, you can parse it to extract the value you’re interested in. For instance, using LINQ to XML:

    using System.Xml.Linq;
    
    textBox1.Text = XElement.Parse(richTextBox.Text)
                            .Descendant("friend_requests_counts")
                            .Element("unseen").Value;
    

    EDIT: Since your XML markup contains namespaces, you have to take them into account when selecting the elements:

    XNamespace fb = "http://api.facebook.com/1.0/";
    textBox1.Text = XDocument.Parse(richTextBox.Text).Root
                             .Element(fb + "friend_requests_counts")
                             .Element(fb + "unseen").Value;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RichTextBox that looks like this: TEXT NEXT_TEXT 10.505 -174.994 0 TEXT
I have a rich text box which is enabled to CTRL + > (or
I have a rich text box in one of my applications (WPF). Now I
Right now I have 3 RichTextBox(es) with text in them. I am taking this
I have this rich text stored in the database <p> <em><strong>strong</strong> and <em>em tag</em>
I have a popup window like this, <controls:ChildWindow Background=Aquamarine> <RichTextBox> <Paragraph x:Name=WarningMessage > <Run>Test
This cide is meant to take the text from a rich text box (that
I have a string that looks like this: TEXT MORETEXT 227.905 174.994 180 1111
I have a rich text box in my c# application and it contains different
I have few TabPages and each contains rich text box. How can I access

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.