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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:28:20+00:00 2026-05-18T09:28:20+00:00

<attributes> <attribute name=Mail Zone property=alerts.p45 type=> <value>mailzone</value> </attribute> <attribute name=Employee Name property=acm_alert_custom_attributes.cs11 type=> <value>employeename</value>

  • 0
<attributes>
  <attribute name="Mail Zone" property="alerts.p45" type="">
    <value>mailzone</value>
  </attribute>
  <attribute name="Employee Name" property="acm_alert_custom_attributes.cs11" type="">
    <value>employeename</value>
  </attribute>
  <attribute name="Manager Name" property="alerts.p23" type="">
    <value><managername></value>
  </attribute>

How can I select the node <value> based on the attribute “name” of the above XML using XPath?

  • 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-18T09:28:21+00:00Added an answer on May 18, 2026 at 9:28 am

    Let’s say you wanted to select the value element that is a child of the attribute whose name is “Employee Name”.

    The XPath expression for that is the following:

    /attributes/attribute[@name="Employee Name"]/value
    

    In XSL you can use it like this:

    <xsl:value-of select="/attributes/attribute[@name='Employee Name']/value"/>
    

    It’s built up the following way. First you want to select a value attribute, whose parent is an attribute element, whose parent is the root (I’m assuming) attributes. The / operator indicates the parent-child relationship between elements. So an expression to select all value elements would be the following:

    /attributes/attribute/value
    

    With that as a base, you want to filter the result by some other attribute. In this case, you want to filter by the name attribute of the attribute element (your choice of names might make things hard to follow). Filtering is done with [] clauses on the elements you want to filter by. In your case that’s the attribute element:

    /attributes/attribute[]/value 
    

    Now you need to put something in the filter. The @ symbol indicates attributes of the element you’re filtering by, followed by the name of the attribute you want. Then you compare the attribute to some known value, to arrive at the above expression:

    /attributes/attribute[@name='filter']/value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to retrieve the attribute name and type that exist in an
I want to print the entire element including tag name, attribute name/value pairs and
Is it possible to get both the attribute name and the value of an
I've got the object User with the following attributes: Id(long), Name(string), e-mail(string), activated(bool). I
How is it possible that C# attributes have Attribute in their name (e.g. DataMemberAttribute
I am using xpath in java. I want to get all the attributes (name
What is the difference between the id and name attributes? They both seem to
I'm trying to select the text from the name attribute of the anchor element
I've created a simple Project model with four attributes: Project name:string description:text complete:boolean user_id:integer
Can anyone tell me how can I get the xpath of the name attribute

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.