Questions tagged [xpath]
The primary purpose of XPath is to address parts of an XML document. It also provides basic facilities for manipulation of strings, numbers and booleans. XPath uses a compact, non-XML syntax. XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax.
xpath
39,481
questions
0
votes
0
answers
18
views
How to get Tag inner text and Attribute value in the same loop and row HtmlAgilityPack C#
Following is the HTML i am working on; (C# project)
</TR>
<TR>
`<TD ALIGN="center"> <INPUT TYPE="checkbox" NAME="f0" VALUE="14652 4-76-...
1
vote
1
answer
32
views
XPath search with text containing soft hyphen
/div[contains(text(),"Inverter")]
This is the code that we currently used to map some objects in selenium with xpath. The problem now is, that they introduced soft hyphens now into their ...
1
vote
1
answer
30
views
How to fix "XPath syntax error: Invalid expression" when using etree.XPath in Python while using union operator "|"
I'm trying to compile an XPath expression using etree.XPath in Python, but I'm encountering a syntax error. Here's the code snippet:
XPATH = '//bridge-domain/(bridge-domain-group-name|bridge-domain-...
0
votes
2
answers
36
views
How to register default NS in libxml2 for C++?
Question: What is the correct way to register the default NS for XPath context?
I've gone through numerous posts (mostly non-C++ and Google search) about registering NS, but I cannot find anything for ...
0
votes
0
answers
23
views
Sign in - Google accounts (choose a account) - Cant seem to be able to click the account (python selenium)
Its the page where you choose which account to login with on a website. I have a hard time clicking the account element. I have no idea if im writing the wrong path or it has something to do with a ...
0
votes
0
answers
21
views
Selenium XPATH for Google general search - how to improve results
I wrote a Python program to run a Google search for each company name in an Excel sheet. However, I get a lot more search results when manually searching the company names up on google.
I suspect it's ...
1
vote
0
answers
42
views
injection on second user fails
I am trying to execute an xpath injection in golang, I am at the point where I can extract data through the injection from the first user in the xml file ' or position()=1]/*[2]|/a['. However from the ...
1
vote
2
answers
44
views
XPath with nested condition using outside element value
My XPath foo is not yet good enough to figure out how to do the following.
I have an XML that's similar to:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<books>...
1
vote
1
answer
39
views
Add column name as XML node and join with other table
I am trying to query table column names as values of the XML Nodes and in the same node add values from the other table. I have found a code in other post that can create nodes from column names but I'...
1
vote
1
answer
26
views
How do I get text in Selenium when the text isn't neatly enclosed within a tag?
<td data-title="Docket No.">"3228"
<div class="cursor-pointer expand-collapse-container expand-document-name">
<div class="expand-arrow&...
0
votes
1
answer
36
views
Extracting the text between span tags in a Javascript-rendered page using Selenium in Python
I am trying to scrape all instances of text between tags with a particular class on a web page that dynamically updates. I am using selenium with a chrome WebDriver in Python.
In a normal browser, ...
0
votes
1
answer
22
views
How can I add additional tagged vlans when using virt-install to create a guest?
I'm unable to figure out the XPath syntax to add a second tagged vlan when using virt-install to provision a guest:
srv01:~$ sudo virt-install\
--name=ds-controller01.iwc.ig24\
--disk source.dev=/...
0
votes
0
answers
24
views
Extract all data inside g tag of JS chart using Selenium
I am currently trying to scrape a local web page, generated by my EV charger. I access it through it's IP address, which requires me to sign in.
After signing in, I want to retrieve the data from the ...
0
votes
2
answers
55
views
Postgresql - XML- Processing xpath with date comparission
I have ingested XML file in Postgresql DB and I trying to perform XPATH operation on the field with date comparison but it is not working. From Postgresql official site I found out that Postgresql ...
0
votes
1
answer
82
views
click() method from element object (HtmlUnit) is doing nothing
I am trying to crawl on this website: https://www.softpedia.com/get/Programming/Other-Programming-Files/Apidog.shtml using html unit.
I want to "click" on "Download now" button, it ...