Question: In C++ please The XML. (eXtensible Markup Language) is a common format used to structure and store data on the Web. The address.xml file on
The XML. (eXtensible Markup Language) is a common format used to structure and store data on the Web. The address.xml file on the website provides a small sample XML file that could be used to store names in an address book. Either type the file in nano (with spaces tabs appropriately) or copy in over to your project directory, and save it to a file named address.x1 The sample file contains four contacts. The tag denotes the start of a field and the tag denotes the end of the field. 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 Palmdalk. Your program should not output any of the tag information, just the address content Sccond, you would like to send an advertising flyer to everyone in rip codes 90210 through 90214 Next, modify your program to also output the names and addresses of everyone whose zip code falls within the specified range. You may assume that cach contact in the address file has the same structure and the same fields. However, your programming solution must be able to handle an input file with any number of sontacts Use vector strings to solve the problem, along with member functions of the string libeary. Useful stnng functions and mernber functions may include get line().find().size(). easiest to declare a separate string vectors substr ( ) . and . push, back { ) for vectorx found to store the names, streets, citics, states, and rip codes Finally, use the following function prototypes: /It a valid contact is founds // getNane() extracts the contact nane trothe til.e // and pushes it t a #tring vecto void getNane(fstrean sfin, vectorestring nane) // getStreet() extracts the street and pushes it to at ing veetor void getstreet (ifstream stin, vectorestring street) getcity) extracts the city and pasbes it to a string vector void getcity(ifstrean &in,vectorcatring eity) / getstate) extracts the state and pashes it to a string vector void getState [itstrean &tin, veetor state); getzip) extracts the zip code and pushes it to a string vector void getzip(ifstream stin, vectorestring zip) When opening the file, the program should fail gracefully if the address.xml fails to open. If you execule the program, the following information should be displayed Palndale Addresses Cathy Pearl 05 A St Palndale, CA 93352 Hendy Jonea 982 Boundary Ave Palmdale, CA 93354 Advertising to 190210-90214 George Clooney 1042 El Camino Real Beverly nills,CA 90214 The XML. (eXtensible Markup Language) is a common format used to structure and store data on the Web. The address.xml file on the website provides a small sample XML file that could be used to store names in an address book. Either type the file in nano (with spaces tabs appropriately) or copy in over to your project directory, and save it to a file named address.x1 The sample file contains four contacts. The tag denotes the start of a field and the tag denotes the end of the field. 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 Palmdalk. Your program should not output any of the tag information, just the address content Sccond, you would like to send an advertising flyer to everyone in rip codes 90210 through 90214 Next, modify your program to also output the names and addresses of everyone whose zip code falls within the specified range. You may assume that cach contact in the address file has the same structure and the same fields. However, your programming solution must be able to handle an input file with any number of sontacts Use vector strings to solve the problem, along with member functions of the string libeary. Useful stnng functions and mernber functions may include get line().find().size(). easiest to declare a separate string vectors substr ( ) . and . push, back { ) for vectorx found to store the names, streets, citics, states, and rip codes Finally, use the following function prototypes: /It a valid contact is founds // getNane() extracts the contact nane trothe til.e // and pushes it t a #tring vecto void getNane(fstrean sfin, vectorestring nane) // getStreet() extracts the street and pushes it to at ing veetor void getstreet (ifstream stin, vectorestring street) getcity) extracts the city and pasbes it to a string vector void getcity(ifstrean &in,vectorcatring eity) / getstate) extracts the state and pashes it to a string vector void getState [itstrean &tin, veetor state); getzip) extracts the zip code and pushes it to a string vector void getzip(ifstream stin, vectorestring zip) When opening the file, the program should fail gracefully if the address.xml fails to open. If you execule the program, the following information should be displayed Palndale Addresses Cathy Pearl 05 A St Palndale, CA 93352 Hendy Jonea 982 Boundary Ave Palmdale, CA 93354 Advertising to 190210-90214 George Clooney 1042 El Camino Real Beverly nills,CA 90214