首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Xpath Position()函数

Xpath Position()函数
EN

Stack Overflow用户
提问于 2022-02-18 07:21:15
回答 1查看 65关注 0票数 -1

我想根据他们的立场来匹配具体的因素。这是密码

代码语言:javascript
运行
复制
<div class="field-content">
  <p><strong>*** Due to the large need for nurses during the coronavirus outbreak, many of the nursing jobs listed below have flexible start dates and assignment lengths. Even if you are unable to start on the designated Start Date, please apply and discuss your availability with a Fastaff recruiter. ***</strong></p>
  <p>The Estimated Weekly Total is based on working the listed number hours per week and includes available stipend amounts; eligibility may vary subject to company policy and applicable law. Please contact a recruiter for full details.</p>
  <h2>Medical Surgical / Telemetry Travel Registered Nurse Job</h2>
  <p>We are seeking an experienced and self-motivated medical surgical / telemetry travel registered nurse to join our growing team of registered nursing professionals.</p>
  <h3>Medical Surgical / Telemetry RN Qualifications:</h3>
  <ul>
    <li>Active RN license in specified state</li>
    <li>RN degree from an accredited registered nurse program</li>
    <li>BLS and ACLS required</li>
    <li>One year of recent experience as an RN in a medical surgical / telemetry environment and two years of RN experience</li>
  </ul>
  <h3>Medical Surgical / Telemetry Registered Nurse Duties &amp; Responsibilities:</h3>
  <ul>
    <li>Manage the care of adult patients experiencing cardiac problems requiring moderately complex assessment, therapies and interventions</li>
    <li>Communicate and educate patients and families</li>
    <li>Assess and coordinate patients’ discharge planning needs with members of the healthcare team</li>
    <li>May require interpretation of cardiac rhythm strips and provision of appropriate nursing treatment</li>
  </ul>
  <h3>Benefits of Being a Fastaff® Travel Nursing Employee</h3>
  <ul>
    <li>Premium pay</li>
    <li>Prestigious facilities</li>
    <li>Flexible scheduling</li>
    <li>Immediate access to the industry’s best RN recruiters and healthcare facilities</li>
    <li>Fastaff will provide costs for housing during the length of your assignment, as well as airfare or mileage to and from the city of the assignment at the start and end of the assignment.</li>
    <li>Group health insurance benefits</li>
    <li>$10,000 Company-paid Life/ADD Insurance</li>
    <li>Matching 401(k)</li>
  </ul>
  <h3>About Fastaff® Travel Nursing:</h3>
  <p>More than two decades ago, Fastaff pioneered the practice of Rapid Response<strong>®</strong>&nbsp;travel nurse staffing. Since then, the company has grown to become the leading provider of urgent and crucial temporary registered nurses to help hospitals
    provide continuous, high-quality patient care, while offering premium pay to registered nurses. In partnering with many of the nation’s largest and most prestigious healthcare facilities as well as small community hospitals, Fastaff provides enriching
    employment opportunities to RNs while also providing the highest pay in the industry to meet acute staffing needs and provide unparalleled patient care.</p>
  <p><em>Fastaff Travel Nursing is an equal employment opportunity employer. Fastaff’s policy is not to unlawfully discriminate against any applicant or employee on the basis of race, color, sex, religion, national origin, age, military status, disability, genetic information or any other consideration made unlawful by applicable federal, state, or local laws. Fastaff also prohibits harassment of applicants and employees based on any of these protected categories. It is also Fastaff’s policy to comply with all applicable state and federal laws respecting consideration of unemployment status in making hiring decisions.</em></p>
</div>

我希望选择小于或等于8的元素,类似于这个//div [contains (@class, "field-content")]//following-sibling::*[position() <=8],但是它给我的结果与这个//div [contains (@class, "field-content")]//following-sibling::*[position() >=8]表达式给出的结果相同。

代码语言:javascript
运行
复制
<div class="field-content">
  <p><strong>*** Due to the large need for nurses during the coronavirus outbreak, many of the nursing jobs listed below have flexible start dates and assignment lengths. Even if you are unable to start on the designated Start Date, please apply and discuss your availability with a Fastaff recruiter. ***</strong></p>
  <p>The Estimated Weekly Total is based on working the listed number hours per week and includes available stipend amounts; eligibility may vary subject to company policy and applicable law. Please contact a recruiter for full details.</p>
  <h2>Medical Surgical / Telemetry Travel Registered Nurse Job</h2>
  <p>We are seeking an experienced and self-motivated medical surgical / telemetry travel registered nurse to join our growing team of registered nursing professionals.</p>
  <h3>Medical Surgical / Telemetry RN Qualifications:</h3>
  <ul>
    <li>Active RN license in specified state</li>
    <li>RN degree from an accredited registered nurse program</li>
    <li>BLS and ACLS required</li>
    <li>One year of recent experience as an RN in a medical surgical / telemetry environment and two years of RN experience</li>
  </ul>
  <h3>Medical Surgical / Telemetry Registered Nurse Duties &amp; Responsibilities:</h3>
  <ul>
    <li>Manage the care of adult patients experiencing cardiac problems requiring moderately complex assessment, therapies and interventions</li>
    <li>Communicate and educate patients and families</li>
    <li>Assess and coordinate patients’ discharge planning needs with members of the healthcare team</li>
    <li>May require interpretation of cardiac rhythm strips and provision of appropriate nursing treatment</li>

这些是HTML中我想要选择的元素,但是表达式与它们不匹配。我正在用Chrome编写XPath表达式

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-18 07:31:02

当您想要的节点是子节点时,您使用的是following-siblings

相反,选择某些位置的所有子级:

代码语言:javascript
运行
复制
//div[contains (@class, "field-content")]/*[position() >= 8]

此选项选择位置为div>=8节点的任何直接子节点。

有关更多信息,请参见这个交互式xpath测试器

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71169705

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档