Questions tagged [xpath-1.0]

Use this tag for questions specific to XML Path Language (XPath) version 1.0

W3C Recommendation:


Online Training

A 70-minutes "Crash Course in XPath" module is available as part of the Pluralsight video-course "XSLT 2.0 and 1.0 Foundations", by Dimitre Novatchev


410 questions
0
votes
1 answer

Xslt - How do you check for a grandchild node with a certain path name. (xpath 1.0)

What I want to do is given an element as context, I want to determine if it has a child with a given name and determine if that child has a node with a given name so I can do operations with it. It is important that I do this in XPath 1.0…
dcco
  • 75
  • 8
0
votes
1 answer

XSLT 1.0 to move namespace to child node

I only have access to xpath 1.0 commands and functions. I need to move the namespace declaration from the root node to a child node where that namespace starts to be used. Source XML:
zmikez
  • 1
  • 1
0
votes
2 answers

How can I determine if an XML node has a last ancestor that does `not` have a certain attribute?

Any

tag within the tags should be transformed to Body_Text. The

tags that have a last ancestor without the attribute "sec-type" should be transformed to Flush_Text (which overrides the first Body_Text transformation here). The…

Ian Campbell
  • 2,678
  • 10
  • 56
  • 104
-1
votes
2 answers

Match only the deepest child instead of its parent

I have this example HTML:
I need to match the element that…
-1
votes
1 answer

Xpath - Exclude one branch in Unordered List

I have a navigation menu in which I wish to bold certain areas of the menu using an injection script. I wish to use a generic xpath to bold each of the items in the menu that I want. Problem is, the menu has some selections of the same name that I…
Steve S
  • 69
  • 7
-1
votes
2 answers

XPath predicate to compare selected node with context node?

Suppose I have the following simplified nested HTML list:
  1. Item 1
  2. Item 2
    • Item 2 1
  3. Item 3
and now I’d like to visit every text node while iterating of the list…
Jens
  • 8,423
  • 9
  • 58
  • 78
-1
votes
1 answer

How to get the intersection of two xpath node sets

To get a union of two different node sets I can do the following using the | separator: node.xpath( '(//C:Year[not(@value="2019")]) | (//R:Product[@value="Phone"])' , namespaces={'C': 'Columns', 'R': 'Rows'}) Is there a way to get an…
samuelbrody1249
  • 4,379
  • 1
  • 15
  • 58
-1
votes
2 answers
-1
votes
2 answers

How to select nodes using find_elemets_by_xpath() with Selenium and Python

I use find_elements_by_xpath to know if keywords exists driver.find_elements_by_xpath('//*[contains(text(), "' + str(key) + '")]') when keyword = 0.5 HR which returns 0.5 HR (correctly) when keyword = 5 HR which still returns both 5 HR and 0.5 HR…
codenew
  • 1
  • 1
-1
votes
2 answers

XPath to find a node by expression specified within another node

I have to create an XML mapping by entering one single XPath (1.0) for each item; worked fine until I now got an XML document like this: 12345
SlowFox
  • 63
  • 5
-1
votes
2 answers

Selenium C# H5 in DIV

I have: (1)
unique name1
I don't want click this div.
(2)
unique name2
I want click this div. …
-1
votes
4 answers

How to extract the text 5000 from the table using Selenium and Java

Need to get the XPATH of following element in the table: Here the value 5000 is varying but Unit Voltage is constant text, need to get an xpath with following element concept, had tried below xpath, but its not working…
-1
votes
3 answers

Unable to locate the element by CSS selector and Xpath

I am trying to locate this tag with CSS selector inner text 1) Introduction I have used the xpath: a.contains("1) Introduction") But its not working. Can anyone help me?
-1
votes
2 answers

Unable to locate element and TimeoutException when WebDriverWait is used

I'm trying to automate the clicking of the "SHOW MORE" button at the bottom of the page to get all the reviews there is. However, I'm having some problems locating it and would really appreciate it if you could help me out. I have tried a couple of…
shannonk
  • 3
  • 2

Field Name

GG…

Random Text

Random Text: Random Text

Random Text: 001057567

Random Text: Random Text

EXAMPLE: 00887546858