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

The Archive Base Latest Questions

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

I have to return a certain node that is a sibling to a node

  • 0

I have to return a certain node that is a sibling to a node that I am using to select a certain parent of both nodes…

suppose…

<?xml version="1.0" encoding="utf-16"?>
<dataTemplateSpecification id="id1" name="name1">
<templates xmlns="">
<template>
  <elements>
    <element id="element0" name="PatientId" display="Patient ID" dataType="String" visable="true" readOnly="false" value="32">
      <mapping path="//Template/TemplateData/ACOData/PATIENT_ID" />
      <validation>
        <rules>
          <rule id="r0" test="#element0.value == ''">
            <fail>
              <html>
                <b>Patient ID is null, value must be present</b>
              </html>
            </fail>
          </rule>
        </rules>
      </validation>
    </element>
    <element id="element4" name="Active" display="ACTIVE" dataType="String" visable="true" readOnly="true" value="A">
      <mapping path="//Template/TemplateData/ACOData/ACTIVE" />
      <!--//Templates/Patient/sources/source/empi"/>-->
      <validation>
        <rules>
          <rule id="r1" test="#element1.value == ''">
            <fail>
              <html>
                <b>EMPI ID is null, value must be present</b>
              </html>
            </fail>
          </rule>
        </rules>
      </validation>
    </element>
    <element id="element2" name="PopulationPatientID" display="Population Patient ID" dataType="String" visable="true" readOnly="true" enc="223" value="198">
      <mapping path="//Template/TemplateData/ACOData/POPULATION_PATIENT_ID" />
      <!--Patient/compositeID[./idType='populationPatientID']/id-->
      <validation>
        <rules>
          <rule id="r1" test="#element1.value == ''">
            <fail>
              <html>
                <b>EMPI ID is null, value must be present</b>
              </html>
            </fail>
          </rule>
        </rules>
      </validation>
    </element>
    <element id="element1" name="EncounterId" display="Encounter ID" dataType="String" visable="true" readOnly="false" value="223">
      <mapping path="//Template/TemplateData/ACOData/FOCUSED_READMISSIONS_ID" />
      <validation>
        <rules>
          <rule id="r0" test="#element0.value == ''">
            <fail>
              <html>
                <b>Patient ID is null, value must be present</b>
              </html>
            </fail>
          </rule>
        </rules>
      </validation>
    </element>

The Xpath I have right now currently only gets the right template. But I need the right element…

//dataTemplateSpecification/templates/template[./elements/element[@name="PopulationPatientID" and @value="198" and @enc="223"]]

I need to xpath to the node that has an attribute named “Active” Is that even possible? I was thinking I might need to drill backwords in the [] section… you know [./../../] where I would be selecting by a finer granularity before then… //dataTemplateSpecification/templates/template/elements/element[./../../] ect.. Does that make sense or am I completely rambling here? Any help would be 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-05-27T21:35:26+00:00Added an answer on May 27, 2026 at 9:35 pm

    @royerboat and @Dimitre Novatchev…

    both of you guys had the right idea and it inspired me to get the Xpath that I needed…

    //dataTemplateSpecification/templates/template[./elements/element[@name="PopulationPatientID" and @value="198" and @enc="223"]]//element[@name = 'Active']
    

    That xpath is precisely what I need. Dimitre, I tried both of your sugestions and they came close, but no cigar. Thanks for the help guys.

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

Sidebar

Related Questions

I'm just trying to restrict block visibility to nodes that have a certain taxonomy
I have a webservice that returns a list of Clinics near a certain lat/long.
I was surprised recently to find that it's possible to have a return statement
I just realized that in some place in my code I have the return
I have a pretty large tree data structure that will get updated (nodes removed
I extended treeview, treenode, and nodetype so I could have custom nodes. Certain nodes
I'm using Opera 11.50 and I have a JavaScript-function that works as a callback
I have a query with a sub query in the select that needs to
In my ASP.NET MVC project I have a requirement to return certain pages in
I have a function which fetches a certain website's HTML code. Eventually that function

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.