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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:58:46+00:00 2026-06-08T17:58:46+00:00

I have this XML: <?xml version=’1.0′ encoding=’UTF-8′?> <applications> <category cat=Player> <app> <name>4Media Blu Ray

  • 0

I have this XML:

<?xml version='1.0' encoding='UTF-8'?>
<applications>
    <category cat="Player">
        <app>
            <name>4Media Blu Ray Creator</name>
        </app>
    </category>
    <category cat="Burning">
        <app>
            <name>Nero Micro</name>
        </app>
</category>
</applications>

Now I want to search in app names and return list of XApplications that contains category names(parent cat attribute).

this is my XApplication class:

class XApplication
{
    public string Name { set; get; }
    public string Category { set; get; }

    public XApplication(string name, string category)
    {
        Name = name;
        Category = category;
    }
}
  • 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-08T17:58:47+00:00Added an answer on June 8, 2026 at 5:58 pm

    Here is my way to do that:

    XApplication[] appList = (from xapp in applicationXml.Elements("category").Elements("app")
                               where xapp.Element("name").Value.ToLower().Contains(txtSearch.Text.ToLower())
                               select new XApplication
                               {
                                    Name = xapp.Element("name").Value,
                                    Category = xapp.Parent.Attribute("cat").Value
    
                               }).ToArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this xml: <?xml version=1.0 encoding=utf-8?> <xml> <head> <name>This is my XML</name> <version>This
I have this XML at http://localhost/file.xml : <?xml version=1.0 encoding=utf-8?> <val:Root xmlns:val=http://www.hw-group.com/XMLSchema/ste/values.xsd> <Agent> <Version>2.0.3</Version>
I have an getting an xml response on this format <?xml version=\1.0\ encoding=\utf-8\?>\r\n <PlatformResponse
I have this XML : <?xml version=1.0 encoding=utf-8 ?> <IMPORT mode=FULL> .... </IMPORT> I'm
I have this XML: <?xml version=1.0 encoding=utf-8?> <ConfiguraCanale ID_Comando=1> <canaleDigitalOUTPUT ID_Canale=1 > <stato>0</stato> </canaleDigitalOUTPUT>
I have this xml file <?xml version=1.0 encoding=UTF-8?> <bo:C837ClaimParent xsi:type=bo:C837ClaimParent xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:bo=http://somelongpathHere/process/bo> <claimAux> ...
My XML looks like this: <?xml version = 1.0 encoding = utf-8?> <gallery> <name>Rosie's
have an xml file like this. <?xml version =1.0 encoding =utf-8?> <menu> <menuNode title=Register
I have this html doc: <?xml version=1.0 encoding=utf-8?><!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>
xml version 1.0 encoding utf-8 in php, I have tried : echo '<?xml version=1.0

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.