Problem

The XML (extensible Markup Language) is a common format used to structure and store data o...

The XML (extensible Markup Language) is a common format used to structure and store data on the Web. The following is a small sample XML file that could be used to store names in an address book. Type it in using a text editor and save it to a file named address.xml (or find it on the accompanying CD).

George Clooney

1042 El Camino Real

Beverly Hills

90214

Cathy Pearl

405 A St.

Palmdale

CA

93352

Paris Hi 1ton

200 S. Elm St.

Beverly Hills

CA

90212

 

Wendy Jones

982 Boundary Ave.

Palmdale

CA

93354

 

The sample file contains four contacts. The <> tag denotes die start of a field and the tag denotes the end of the field.

a.You are hosting a party in Palmdale, CA. Write a program that reads in the address.xml file and outputs the names and addresses of everyone in Palmdale. Your program shouldn’t output any of the tag information, just the address content.

b.You would like to send an advertising flyer to everyone in zip codes 90210 through 90214. Write a program that reads in the address, xml file and outputs the names and addresses of everyone whose zip code falls within the specified range.

You may assume that each contact in the address file has the same structure and the same fields. However, your solution should be able to handle an input file with any number of contacts and should not assume that the fields within each contact are in the same order

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT