The Easiest Way to Parse XML with JavaScript

preview_player
Показать описание
In this video, I'll show you how easy it is to parse XML strings using JavaScript - no libraries or frameworks are required to do this 🙂

Towards the end I'll also show a Fetch example where an XML document is retrieved from a file and then parsed to access the data within it.

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript
Рекомендации по теме
Комментарии
Автор

You're awesome!

Thank you so much for this great tutorial -- because of you now I don't have to ttml-to-json python package, and my code runs way much faster!

ahmedAltariqi
Автор

Wow, exactly what I needed! I was about to go crazy with some regex, but I think you just saved me a lot of pain

sondrepedersen
Автор

Thank you for the tutorial, it helps me a lot at work. ❤

crownkiwifactoryNZ
Автор

Humble and humbling DOMParser, nice, didn't know,

alvarobyrne
Автор

Great content. How can I ask If an element exists inside the XML document? Thanks for this great an easy tutorial.

ivanetinajero
Автор

Can you please tell how to parse any content data from dynamic html file

Dhiraj_Chaudhari
Автор

What about big file?? Is there in 2023 native SAX parser??

zegarek
Автор

Is it true that text/xml is parsed as US-ASCII while application/xml is parsed as UTF-8?

SuviTuuliAllan
Автор

If you have error put <?xml version="1.0" encoding="UTF-8"?> in your xml

aleksandrkobelev
Автор

Can you please do a video about how to create like vuejs library I mean reactivity etc I watched the your spa video and I like it .

mohamedsimo
Автор

When I paste in the xml as he has it (1st part of the video), the editor throws an error and doesn't like the XML pasted. Anyone else have this problem?

tamerlone
Автор

🦩 Hello everyone!

🟢 00:00 - introduction
🟢 01:00 - handle xml from string
🟢 01:40 - use of DOM parser
🟢 03:24 - element navigation
🟢 05:20 - handle xml from fetch request

xawoo
Автор

i can not split my string literal across multiple lines

christianromero
Автор

How to convert this XML string to json??

madalabhavyasri-nrpr
Автор

Verry helpful channel!.. 👏 Do you have a link for codes? Or shall I write it! :) 🌹

erturkyorulmaz
Автор

CONST NOT CUN+S. PARSE NOT PAWS, rotfl (or WOTFL for you). great tutorial. just takes a few minutes to figure it out. fun

ReginaldBarclay-trcp