Questions tagged [textnode]
textNodes in DOM, HTML, XML are nodes which contain only text, rather than the other node types of element, comment, and processing instruction.
textnode
193
questions
0
votes
1
answer
119
views
How can one enable/implement a full text search of any of a DOM node's or the entire document's text-content?
I've stumbled upon a technical test in which i have to count occurrences of words inside an HTML body. I have to avoid script tags and comments, these are the unique conditions from the problematic.
...
-1
votes
1
answer
36
views
How to detect that a text node is inside a tag
I have html file
<div>1. <span id="el1"> hello </span> world</div>
<div>
<span id="el2"> first part</span>
<span ...
0
votes
3
answers
784
views
Extract text from Text Node using XPath
I am new to XPath and trying to capture the values "Time: " and "13:45" from the following HTML snippet. Any help or suggestion will be really useful. Thank you!
<div class=&...
0
votes
1
answer
124
views
GraphQL Query error with Contentful and Netlify
I'm not an expert coder but have this error in my Netlify Account where I am trying to update code and such and keep getting this error on my builds.
The error is :
GraphQLError: Field "...
0
votes
0
answers
22
views
DOM Operation Unsuccessful - Show HTML in Element
Working code here is mixed with non-working code. The code works up until the line where it commands the innerText to be of
x.innerHTML.substring(3,-3)
This is the function I am calling on a click ...
0
votes
1
answer
821
views
Adding TextNode to HTML element with appendChild()
I am trying to create a simple "Shopping List" whereby the user types in the name of the items and then click the "add to List" button to add the items to the list, which it will ...
0
votes
1
answer
423
views
Convert [Object text] to plain text in JavaScript
i have following code:
const x = document.createTextNode('Helloooo')
document.body.insertAdjacentText('beforebegin', x)
and after execution i see something like [object Text].
My question is how do ...
1
vote
2
answers
178
views
Python - Getting text using selenium from text node
I'm trying to scrape some information from a website using Selenium and Python and sometimes there's texts like this HZS stonks remaining... that does not have any name or label that I can get the ...
1
vote
1
answer
465
views
Replace mutation target text node with a span element
I am using MutationObserver to track character changes in my rich text editor. Everytime a text is edited, the mutation callback method is called with the list of mutation records. The mutation target ...
0
votes
2
answers
580
views
How to get the text before & after the hyperlink using Selenium and Xpath
I am trying to find cases using Xpath/Selenium where there is no white-space before the hyperlink.
e.g.
<p>Click on this<a href="#">link</a>to access the data</p>`
...
1
vote
1
answer
173
views
How to extract the text "152" from the textnode using Selenium
I need to extract the xpath for the number 152. The xpath that I created extracts the text after 152 which is "Test" but excludes the number 152. I need to get this count.
I am using below ...
2
votes
1
answer
581
views
why can't I insert text object into an element's innerHTML
we can assign the input value to a variable and then we're assingning that variable to an element's innerHTML, likewise why can't I insert text object into an element's innerHTML??
eg code:
x = ...
2
votes
2
answers
129
views
How to access text in a website using Java Selenium
How to access text in a website using Java Selenium?
HTML snapshot:
Can someone explain to me how to access the demouser and email id using java selenium in the above picture
https://phptravels.com/...
0
votes
0
answers
156
views
JavaScript getting innerHtml for all text nodes in nested elements [duplicate]
Need to process text inside uncertain layers of nested nodes using following function:
function processTextNodesIn(elem) {
if (elem) {
for (var nodes = elem.childNodes, i = nodes.length; i--;) {
...
1
vote
2
answers
673
views
what is the difference between <p> and text nodes?
i'm learning HTML, and it is not clear yet to me what is the difference in using a text node or a <p> element.
more precisely, what are the advantages and disavantages of using a <p> ...