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.

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:

  1. A function to walk the tree starting from its root, following an XPath to a desired node.
  2. 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.

Your bodies for these functions should be written in extraction.cpp.

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.

Example 1

./xmlextract test0.html /html/body

will print

Hello world!

Example 2

./xmlextract test1.html /html/body/p[2]

will print

world!

Example 3

./xmlextract books1.xml /rdf:RDF/pgterms:etext/dc:creator

will print

Twain, Mark, 1835-1910

Example 4

./xmlextract books1.xml /rdf:RDF/pgterms:etext[3]

will print

&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
2003-07-01 17

Please only submit new extraction.cpp file with the bodies fot the two missing functions!

find the cost of your paper

create a presentation of the impacts of technology on society.

Imagine you are asked to make a presentation to your coworkers about technology and how technology influences society. How would you describe technology and its relationship to society using examples?….

identify a problem or opportunity in the IT area and develop a solution to the problem. 

You are required to identify a problem or opportunity in the IT area and develop a solution to the problem.  The project should integrate theory and application from across your….

develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our Linux lab).

Description: You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our Linux lab)…..