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.

textNodes in DOM, HTML, XML are nodes which contain only text, rather than the other node types of element, comment, and .

191 questions
2
votes
1 answer

AppendChild (Javascript) and Internet Explorer

As a student and someone fairly new to web development, I'm experiencing the following seemingly strange problem in Javascript - but only in IE (IE9 to be precise; haven't yet tried IE10). In Firefox, the script works without any problems. The code…
Holland
  • 395
  • 9
  • 22
2
votes
6 answers

appendChild does not work. New to Javascript

I'm new to JavaScript and I currently have an assignment. One question asks us to attach a new textNode to the

tag. But my appendChild doesn't want to work. All my other code works fine and does what it's supposed to. Obviously I am doing…

Riette du Toit
  • 45
  • 1
  • 2
  • 8
2
votes
2 answers

jQuery : Select previous sibling of text node

Let's say we have the following HTML code:
Select Gender: Male Female
My goal is to check the male radio button (the first one). However, I don't know if this radio…
jeanpaul62
  • 9,451
  • 13
  • 54
  • 94
2
votes
1 answer

Is there an alternative to jQuery / sizzle that supports textNodes as first class citizens in selectors?

I've discovered that I have a need for selectors with full support for DOM textNodes that jQuery doesn't provide. jQuery ignores text nodes, probably because most pages have tons of irrelevant blank ones between tags that the various browsers can…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
2
votes
1 answer

Knockout.js text binding - multiple spaces collapsed

It seems that when using Knockout's text binding, multiple spaces become collapsed into one. For example:

function VM() { this.Notes = ko.observable(); } var vm =…
Tom W Hall
  • 5,273
  • 4
  • 29
  • 35
2
votes
1 answer

Why do we get Empty Text Nodes in a simple Document

Given this simple code Start Here I get lots of empty text nodes in IE9 as follows. After…
Jawad
  • 8,352
  • 10
  • 40
  • 45
2
votes
0 answers

How to deal with parentheses in a text node in xpath?

Say we have the following HTML code I tried with the following xpath expression in Chrome but can't locate to that element: //label[text()='AgendaShowCapacity (1 remaining)'] I was…
Bruce Sun
  • 631
  • 1
  • 10
  • 26
2
votes
1 answer

Finding text in a table with jQuery

I have a table that has rows like this: Ut Urna Nisl
Tim Sheiner
  • 3,253
  • 4
  • 27
  • 22
1
vote
1 answer

SSIS split XML text

I'm wondering if there is someone who can help me to acheive the following. I have a XML file with a text value containing for every week a value. I would like to put every week into a database as a seperate row. I know how to put XML files into a…
Bas
  • 597
  • 5
  • 10
  • 22
1
vote
1 answer

remove B elements add them at the end of the doment load

I have an issue with a jquery script using text node to find and wrap text in a div. It's ignoring elements at the very start. But not after any plain text. Bold introduction content content content content content To…
uriah
  • 2,485
  • 5
  • 28
  • 40
1
vote
2 answers

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 text by: I can get the mkt-card class element…
1
vote
1 answer

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 is the text node in which changes are made. I…
1
vote
1 answer

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 xpath : //div\[@class='filter_filter__5H_fi'\]/h1 Not sure…
Nilesh Ambestha
  • 17
  • 1
  • 1
  • 7
1
vote
1 answer

How can I get only the content of text nodes (not nested tags) from an HTML tag element in JS?

Suppose I have
foo bar bob
Is there a JavaScript function/property which will return "bob"? I tried document.getElementById('mydiv').textContent but that gives "foobarbob", as does…
Codemonkey
  • 4,455
  • 5
  • 44
  • 76
1
vote
2 answers

Parse Text Values From XML File in Java

So right now I am using the SAX parser in Java to parse the "document.xml" file located within a .docx file's archive. Below is a sample of what I am trying to parse... Sample XML Document
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81