Complete a program that is designed to read an XMl file, follow an XPath to a selected node, and then list all of the text content (ignoring attributes) in the subtree rooted at the selected node, in the order that the text appeared within the original XML file.
You will be provided with the bulk of the code for this program, including the input processing to read XML and convert it into a tree structure (declared in node.h).
Your task is to supply the functions declared in extraction.h:
A function to walk the tree starting from its root, following an XPath to a desired node.
A function to extract all of the text (in the leaves of the tree) in the tree, combining it into a single string with one or more blanks separating the text strings from different nodes.
To run the application program, supply two command line parameters. The first will designate an XML file and the second will be the XPath to the desired node.
./xmlextract test0.html /html/body
./xmlextract test1.html /html/body/p
./xmlextract books1.xml /rdf:RDF/pgterms:etext/dc:creator
Twain, Mark, 1835-1910
./xmlextract books1.xml /rdf:RDF/pgterms:etext
&pg; A History of the Early Part of the Reign of James the Second Fox, Charles
James, 1749-1806 Morley, Henry, 1822-1894 [Editor] A History of the Early Part
of the Reign of James en Great Britain — History — James II, 1685-1688 DA
Please only submit new extraction.cpp file with the bodies fot the two missing functions!
As the best, my homework help website in the world, Writersabc.com strives to deliver only high-quality finished papers to all customers. We value impeccable quality and guarantee that we will deliver on that promise more than anything else. We will deliver!
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.
Have you received your finished paper but are not satisfied with what our writer submitted? You can initiate our money-back guarantee to get your money back with no strings attached.Read more
Writersabc.com is the best my homework help website in the world. At WritersABC, we have a team of certified, tried, and tested writers who work around the clock to ensure that you receive only high-quality, 100% original finished papers.Read more
At WritersABC, we guarantee all our customers of the best essay writing service in the writing industry. And that’s precisely what we strive to deliver. As such, we encourage all our customers to utilize our unlimited free-revision policy if you aren’t satisfied with your paper. Don’t accept any paper until you are 100% satisfied with it.Read more
We value the trust that our clients accord us and respect every customers’ rights to personal data protection. We will never share, sell, or rent any information that we collect from you with any third parties. Both your personal and financial information is safe with us.Read more
We have only gotten this far with the help of our loyal customers and a team of dedicated experts. As the best, my homework help website, WritersABC implores customers to help make our writers’ work easier. Visit our fair-cooperation guarantee for more information on the same.Read more