I am trying to write code that separates specific items from within the .xml file this .xml file. Ive got the file to open from the console but I am still unclear is to how to eliminate and break how the printout is from the file. eliminate I mean not print to screen and by break i mean how to print the results on multiple lines, not one long line from the file.
here is the .xml file. <address_book><contact><name>George Clooney</name><street>1042 El Camino Real</street><city>Beverly Hills</city><state>CA</state><zip>90214</zip></contact><contact><name>Cathy Pearl</name><street>405 A St.</street><city>Palmdale</city><state>CA</state><zip>93352</zip></contact><contact><name>Paris Hilton</name><street>200 S. Elm St.</street><city>Beverly Hills</city><state>CA</state><zip>90212</zip></contact><contact><name>Wendy Jones</name><street>982 Boundary Ave.</street><city>Palmdale</city><state>CA</state><zip>93354</zip></contact></address_book>
My logic for getting the info out is off this mess:
-while reading from file read the stuff in <> and </> out of the print
by setting them to string start=<> end=</>
I am also still unclear whether when to use type char or type string and whats the difference.
Here is just some code to see the printout: