All Questions
981
questions
1
vote
0
answers
26
views
How can I get an elemment containing text wich has other things inside with XPath? [duplicate]
<button data-bn-type="button" type="button" class=" css-m5s6fw">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill=&...
1
vote
1
answer
40
views
select div conditionally using xpath
I want to select a div only when the condition is satisfied/valid.
The following div can be present in 2 ways(button will be enabled/disabled) when loading the html.
Enabled button state:
<div ...
0
votes
1
answer
45
views
How can I find a relative xpath for buy button
I want to find the xpath of the buy button. I created the paths using copying through chrome but they are not working on everypage of the website where I require them to work.
I require a path such ...
1
vote
1
answer
43
views
XPath for element whose children start and end with element X?
Here is my example:
<div>
<p><em>Emphasized text</em> followed by any <span>other text</span> and ending with an <em>emphasized text</em></p>
&...
1
vote
1
answer
170
views
How can I get a specific node from XML in Java and then remove it?
I have an XML file that I need to navigate and it's something like this (full XML is here):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<md:...
0
votes
2
answers
104
views
For XPATH, how can I use OR for different types of ancestors?
I'm trying to block certain results from appearing on my Google searches but I'm having a hard time concisely creating a one-line block using uBlock Origin.
For example, I don't want 'www. imyfone.com'...
0
votes
0
answers
66
views
PHP strip_tags doesn't allow <img> images in DOM
I'm trying to have the posts description for a Wordpress blog to show only some HTML elements including the images (img). So I have canceled the the_content() in the theme file, and replaced it with a ...
0
votes
1
answer
20
views
How to locate the element which has same class name and text as shown below
I need to click on the element which is there in the list but I am unable to click on the element I am using (//[@class="pb-dropdown__contents pb-dropdown__contents--no-margin pb-...
1
vote
2
answers
205
views
HtmlAgilityPack - Select descendant until element with class
I'm using HtmlAgilityPack in my C# application to scrape some HTML code. But I'm having issues selecting a particular tag.
This is the HTML that I have:
<div class="Post">
<img ...
1
vote
1
answer
115
views
How to get entire tag as String from an XML
The problem here is that I am getting different xml's with different namespaces everytime.
I have to read one tag as string and pass it to another service.
Lets say I am getting this xml one time
<?...
0
votes
1
answer
91
views
DOMXPath: Find all H2 and H3 headlines with a specific character
I want to find every <h2> and <h3> tags which are a question.
So I need to check if the headline contains a question mark ?.
At the moment my code looks like this:
$query = '//*[contains(&...
1
vote
1
answer
87
views
XPath: Get first paragraph after headlines
I want to add a FAQPage schema to my site.
To do so, I need to find every <h2> or <h3> tag with a question mark in it. That would be the question.
After that I need the first <p> tag ...
0
votes
2
answers
94
views
Python extracts texts following a span tag inside another span tag
Is there a way to extract "Part-time, Full-time" and "On Campus" from the span tag?
<span class="SecondaryFacts DesktopOnlyBlock" data-v-3c87c7ca="">...
0
votes
1
answer
100
views
how to remove items from DOM and XPath in my browser?
I hope somebody can help. I'm trying to remove items from ebay listings with the Firefox addon RIP (remove it permanently) which uses XPath and removes selected paths. As a side note: the addon is ...
0
votes
1
answer
58
views
How to implement siblings nodes (XPATH expressions) relation in Java using DOM and XALAN processor
Hello everyone I am developing a program in Java to read the XML using XPATH for siblings nodes (elements which are same level)
I am not able to implement below XPATH expression in Java:
//*:root/*:...