Computer Science, asked by meghakatiyar1, 1 year ago

what is parsing? explain with coding in xml

Answers

Answered by guru0101
2
Example

<html>
<body>

<p id="demo"></p>

<script>
var text, parser, xmlDoc;

text = "<bookstore><book>" +
"<title>Everyday Italian</title>"+
"<author>Giada De Laurentiis</author>" +
"<year>2005</year>" +
"</book></bookstore>";

parser = new DOMParser();
xmlDoc = parser.parseFromString(text,"text/xml");

document.getElementById("demo").innerHTML =
xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
</script>

</body>
</html>

hope it's helpful



guru0101: wlcm
meghakatiyar1: HTML ki coding hai
guru0101: sorry nhi h
guru0101: net se mil gye gi
Answered by negidharma143
0

A parser is a piece of program that takes a physical representation of some data and converts it into an in-memory form for the program as a whole to use. Parsers are used everywhere in software. An XML Parser is a parser that is designed to read XML and create a way for programs to use XML.

Similar questions