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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:48:44+00:00 2026-06-01T09:48:44+00:00

I am using TinyXPath to enhance an existing test tool so data from a

  • 0

I am using TinyXPath to enhance an existing test tool so data from a customer XML structure can be fetched and used.

The XML looks like this

<Platform>
  <LinkData>
    <Plan>
      <Label>A</Label>
        <Settings>
           <SomeSetting1>ENABLED</SomeSetting1>
           <SomeSetting2>ENABLED</SomeSetting2>
        </Settings>
    </Plan>
    <Plan>
      <Label>B</Label>
        <Settings>
           <SomeSetting1>ENABLED</SomeSetting1>
           <SomeSetting2>DISABLED</SomeSetting2>
        </Settings>
    </Plan>
  </LinkData>
</Platform>

Given the above structure, which I have no control of, I need to be able to construct XPath expressions for TinyXPath. Put simply TinyXPath needs to return the values in the SomeSetting1/2 fields given when the correct child Label values match (resolve to true), so the test app can use them.

I have tried the following but an struggling with the way is indexed using a child element (normally I would expect use of an attribute. Here is my attempt which does not return a result (e.g. ENABLED/DISABLED) :-

Platform/LinkData/Plan[child::Label='A']/Settings/SomeSetting1/text()
Platform/LinkData/Plan[child::Label='A']/Settings/SomeSetting2/text()
Platform/LinkData/Plan[child::Label='B']/Settings/SomeSetting1/text()
Platform/LinkData/Plan[child::Label='B']/Settings/SomeSetting2/text()

Any further help from TinyXPath gurus would be much appreciated – thanks!

  • 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-01T09:48:46+00:00Added an answer on June 1, 2026 at 9:48 am

    This xpath will return what you’re looking for with the given XML:

    //Settings/child::node()/text()
    

    This xpath will also add a check for Labels and group by concat |:

    //LinkData/Plan[Label/text()='A']/Settings/child::node()/text() | //LinkData/Plan[Label/text()='B']/Settings/child::node()/text()
    

    And this one combines them both inside the label check:

    //LinkData/Plan[Label/text()='A' or Label/text()='B']/Settings/child::node()/text()
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PHP, I can convert MySQL data or static table data to csv, Excel,
Using Android TelephonyManager an application can obtain the state of data activity over the
Using Java, how can I extract all the links from a given web page?
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
Using Nunit, I want to be able to write a test fixture that will
Using jQuery, one can easily find out whether a particular element is visible using
Using the HTML5 File API I can get the Binary String representation of a
Using mercurial, I've run into an odd problem where a line from one committer
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

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.