Trees And Tags

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).

Don't use plagiarized sources. Get Your Custom Essay on
Trees And Tags
Just from $13/Page
Order Essay

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.

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


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!





Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our Guarantees

As the best, my homework help website in the world, 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.

Money-Back Guarantee

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

Zero-Plagiarism Guarantee 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

Free-Revision Policy

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

Privacy Policy

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

Fair-Cooperation Guarantee

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

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages