What does parsing XML mean?
Can someone please explain to me what parsing XML means? And what does an XML parser do in general?
It means "reading" the XML file/string and getting its content according to the structure, usually to use them in a program.
For example if you have this XML fragment:
<root> <node1>value1</node1> <node2>value2</node2> </root>
you may want to use these values in a data structure:
ClassRoot: node1: string node2: string
so that, in the end:
Object goofy = ClassRoot.new parse(xml, goofy) puts(goofy)
yelds something like:
An XML parser is the piece of software that reads XML files and makes the information from those files available to applications and programming languages, usually through a known interface like the DOM
Usually some information is stored in xml documents. In order to use this information in your program you have to parse it - read line by line or node by node and fetch pieces of information.
XML: Extensible Markup Language is a set of rules for encoding documents electronically. It is defined in the produced by the W3C and several other related specifications; all are fee-free open standards.
Parser: a computer program that divides code up into functional components; "compilers must parse source code in order to translate it into object code"