Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

const xmlData = response.data // from axios; const parser = new DOMParser(); const xmlDoc = parser.parseFromString(xmlData, "text/xml"); The parsing step creates such error: ...
Skull Cutter's user avatar
4 votes
2 answers
193 views

I am trying to use Cheerio and Node.js to extract text from an interesting bit of HTML. Let's say I have the following HTML: <p> <span class="sectionno" id="s1">1</...
Adam D's user avatar
  • 2,327
0 votes
0 answers
62 views

Recently I noticed a change in the way DOMParser created XMLDocuments returned text with carriage returns in textContent. Namely, carriage returns are not longer being returned in textContent. On the ...
Copripop's user avatar
1 vote
1 answer
137 views

I'm trying to switch my extension from MV2 to MV3 and I'm stuck on the DOMParser using the Offscreen document Service_Worker : *const OFFSCREEN_DOCUMENT_PATH = "/background/offscreen.html"; ...
BillyBoy1's user avatar
0 votes
0 answers
24 views

I'm trying to use the PHP Simple HTML DOM Parser for the first time from here - https://simplehtmldom.sourceforge.io/docs/1.9/index.html Unfortunately, I'm having an issue where it's not returning ...
Lewis Hardisty's user avatar
-1 votes
1 answer
361 views

I'm trying to parse a page in a Googlescript script in order to get a list of tables at "https://stihi.ru/readers.html?vlassoff&start=0" But the script gives an error ReferenceError: ...
Тульский Самовар's user avatar
2 votes
1 answer
227 views

I'm trying to programatically create a svg node like this const parser = new DOMParser() const doc = parser.parseFromString(mySvgAsString, 'image/svg+xml') const svg = doc.children[0] Everything ...
Frnak's user avatar
  • 6,862
-2 votes
5 answers
103 views

I have an app that allows user to generate text with HTML code in the following format: <h2>User generated Dynamic Data 1</h2> <h3>User generated text 1.1</h3> <h3&...
mendicant_bias's user avatar
0 votes
1 answer
240 views

I need to search for fields and values within a text and turn them into an object. Example of text // condition 1 <@if VERSION = "A1" || VERSION = "A3"> <@assign CTA = &...
Vale46's user avatar
  • 1
1 vote
1 answer
74 views

If you take an XML String which has CDATA elements embedded within CDATA elements with the correct structure. (Where the embedded CDATA close of ']]' is represented as ']]]]>]]>" And you ...
Garry P's user avatar
  • 21
0 votes
1 answer
237 views

I am experiencing an issue with transforming XML data using XSLT in JavaScript. My setup involves fetching XML data and an XSLT stylesheet, which is embedded within a tag in my HTML. When I try to ...
programmmm's user avatar
-1 votes
3 answers
434 views

I must first state that I am not a champion in programming, although created a handy website using html, php, MySQL and some javascript. Clearly, JS is by far the language I am almost using as a baby !...
bernard1418's user avatar
1 vote
0 answers
36 views

I want to replace certain words or word groups with corresponding <a>-elements that link to specific sub-pages. Let's say, I have the following text as my DIV-body: The decentralized exchange ...
delete's user avatar
  • 19.4k
0 votes
0 answers
117 views

This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. The warning is from method parseMarkup. How to suppress the warning? It seems an internal ...
volatile's user avatar
-1 votes
1 answer
123 views

In my sample xml I've got a tag like this. <ISAPPLICABLE>&#4; Applicable</ISAPPLICABLE> While I was trying to create an XML in java, I tried to hardcode this. public void addElement(...
Pranjal Choladhara's user avatar
0 votes
1 answer
326 views

In React Native i want to parse www.google.com and get its element that has a class class="lnXdpd". I'm unsure how to use querySelector so once i fetch the url and have its string to parse ...
Marius's user avatar
  • 2,026
0 votes
4 answers
72 views

I need to parse the style attribute from an html corpus (contains many different html entries with many different style attribute). An example of HTML may be the following : <span style="font-...
Skary's user avatar
  • 1,372
0 votes
2 answers
412 views

While parsing one of the XML files using XML Serializer in Java, the HTML entities are converted into their corresponding hex code values(like for mdash output is "hexcode value-#x2014;") ...
Rahul's user avatar
  • 21
0 votes
1 answer
32 views

I have one XML file say source.xml <students> <student2> <college>SIET</college> <name>Rithvik</name> </student2> <student1> &...
Yogendra 's user avatar
2 votes
2 answers
167 views

I am trying to build a chrome extension that aggregates information from a bunch of sites when the user visits a site A async function fetchHTML(url) { const response = await fetch(proxyUrl + url)...
Piyush's user avatar
  • 636
7 votes
2 answers
1k views

I am writing a user script that runs on https://example.net and makes fetch requests for HTML documents from https://example.com that I want to parse into HTML DOM trees. The fetch API only gives me ...
dumbass's user avatar
  • 27.2k
0 votes
1 answer
419 views

Hey i'm trying to use the DOMParser api inside a vscode extension that i'm making right now. vscode tells me it cant find the DOMParser instance and relevant methods when i try to use it. I managed to ...
moon's user avatar
  • 43
1 vote
1 answer
558 views

I have some xml that I am trying to convert to xml document using DOMParser, make some changes and then convert back to xml string. But when I convert back to string using XMLSerializer, it changes &...
user21067413's user avatar
0 votes
1 answer
556 views

I tried writing a unit test for one of our classes. It makes use of the DOMParser to access some XML attributes fetched from an endpoint. The fetchXML part looks like this: export async function ...
Ximtor's user avatar
  • 13
1 vote
0 answers
32 views

First of all English is not my first language, so sorry in advance for the mistakes. The thing is I need some help understanding why I´m overwriting some values inside my array list. I know this ...
Monstruo's user avatar
0 votes
1 answer
209 views

I have this xml file that contains 3 categories:employee_list, position_details and employee_info. <?xml version="1.0" encoding="UTF-8"?> <employee> <...
Andrei Rus's user avatar
0 votes
2 answers
377 views

I need to display some numbers, strings from a class named Student, but i can't figure it out how i can change the id from children element. I have to use JavaScript. what i tried to do: class Student{...
AmicuLL's user avatar
  • 55
1 vote
0 answers
198 views

I used java dom to parsing rdf xml in java, but I couldn't parsing rdf xml in the direction I wanted. Here is my code : String[] arr = new String[100]; DocumentBuilderFactory factory_parsing = ...
user20297975's user avatar
0 votes
5 answers
201 views

I am trying to add a random class name to elements that contains inline background color. I want to add one more condition to that. If parent and child elements both have inline background color, no ...
Karuppiah RK's user avatar
  • 3,994
1 vote
1 answer
78 views

I have a user generated rich text content that needs to be modify with some additional static class names. I tried below JS code. First I get the content and using DOMParser. Then iterate all elements,...
Karuppiah RK's user avatar
  • 3,994
0 votes
1 answer
47 views

We are adding code to convert a DOM to Domino before invoking saxon library to process xquery expression, which involves constructing a xml document as output. Following exception is seen, for DOM ...
jmashalk's user avatar
0 votes
1 answer
590 views

I have some code takes a string of raw Markdown stored in 'markdownString' and converts it to HTML with the marked.js library for display on the web browser. I am trying to grab all plain text values ...
Barry's user avatar
  • 286
0 votes
1 answer
636 views

Im gonna rebuild my answer because the first time was a i mess; im trying to do two things first one is to get the body from a html with dom parse; const stripHtml = function (html) { const ...
KeyGy's user avatar
  • 35
5 votes
2 answers
545 views

When using DOMParser, <video> tag is not working in Safari, its preview is rendered but without controls and without the ability to play: const parser = new DOMParser() const parsed = parser....
Limon Monte's user avatar
  • 54.7k
0 votes
0 answers
79 views

const app = document.getElementById("app"); const lessonText = ` <span style="font-family: &quot;Courier New&quot;, Courier, monospace;"> <font color="#...
Henok Tesfaye's user avatar
1 vote
4 answers
1k views

I need a help about testing mailhog with cypress. I am trying to click on "Forgot password" link in email body, any advice how to do it?
Nenad R's user avatar
  • 11
0 votes
1 answer
561 views

I'm again asking for help.... Let's see, I've the next situation, I build a module for manage the clients in a web platform, when some order is gonna be created the user selects a client from a select ...
Joseph Aguilar's user avatar
1 vote
2 answers
175 views

Just realized that by default, DOMParser.parseFromString() creates documents in Quirks mode. Is there a way to make it Standard mode? console.log(document.compatMode) // 'CSS1Compat' const doc = ...
Yangshun Tay's user avatar
  • 53.7k
1 vote
3 answers
2k views

I need to convert a HTML String with nested Tags like this one: const strHTML = "<p>Hello World</p><p>I am a text with <strong>bold</strong> word</p><p>&...
thooyork's user avatar
  • 495
1 vote
1 answer
140 views

I have a variable called $text. I want to make it so that if there are any spans with the class "emote", replace the entire span and its contents with the title attribute of the span. Also, ...
Felix's user avatar
  • 2,791
-1 votes
2 answers
333 views

I am trying to get a regex that matches the strings between this output <p>save</p> <p>11<br />\nabc<br />\nabc<br />\nhello</p>\n\n<p>dfcs dcsd</p&...
Ankur Singh's user avatar
0 votes
0 answers
25 views

This is running in IE browser. This is my xml <fields> <from><type>string</type><value> India</value></from> <number>&...
Rosh's user avatar
  • 1,746
0 votes
3 answers
763 views

I have got an xml file and try to read in some information and try to arrange them. The data in the xml looks like: <Class code="1-10" kind="category"> <Meta ...
GrobMo's user avatar
  • 51
0 votes
1 answer
396 views

I have cpp code which is used to read xml files, parse data and then store it in table. Initially data was ASCII encoded but now it is UTF8 encoded. code is using Xerces c++ , can some help where it ...
ninad's user avatar
  • 1
-1 votes
1 answer
3k views

I am trying to parse a text to a text/xml and get the value that is inside a child Node but is giving this error to me (Cannot read properties of undefined (reading 'childNodes'). I want the value ...
Hugo Queirós's user avatar
-1 votes
1 answer
100 views

Assuming I have the following HTML snippet: Deep Work <p> <a data-href="Deep Work" href="Deep Work" class="internal-link" target="_blank" rel="...
Fabian's user avatar
  • 1,844
0 votes
0 answers
245 views

I am trying to parse a web page using dom-parser in nodejs. when i hit request through this, it shows 404 not found error but the page can be browsed using browser. here is my code. var request = ...
Tashen Jazbi's user avatar
  • 1,068
1 vote
2 answers
246 views

I need to replace all ? in file1.xml with element value present in File2.xml. And also need to remove extra element node present in File1.xml whose value is not present in File2.xml. (i.e. In my ...
ankush garg's user avatar
0 votes
0 answers
87 views

I am using the DOMParser() to create a new Document Object Model from a remote webpage so that I can make an in-browser web scraper. This is the code that I have to retrieve the remote webpage. ...
Thomas the plane's user avatar
0 votes
0 answers
328 views

I'm making a chrome extension. I'm trying to get some pages' html through the javascript. I found the code I can use in this site. Here is the code: fetch(url) .then(function (response) { // When ...
mogumogusityau's user avatar

1
2 3 4 5
12