Hello,
I'm new to XML processing in
Java and I need some help. I have following XML file that I want to extract a vector of store object from:
<CHAINS>
--<STORE>
----<LOCATION>USA</LOCATION>
----<REVENUE>120000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>Taco Salad</ITEM>
------<ITEM>Huge Drink</ITEM>
----</MENU>
--</STORE>
--<STORE>
----<LOCATION>CAN</LOCATION>
----<REVENUE>90000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>French Toast</ITEM>
----</MENU>
--</STORE>
--<STORE>
----<LOCATION>JPN</LOCATION>
----<REVENUE>150000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>Taco Salad</ITEM>
------<ITEM>Miso Soup</ITEM>
------<ITEM>Sushi Salad</ITEM>
------<ITEM>Huge Drink</ITEM>
----</MENU>
--</STORE>
.
.
.
</CHAINS>
How do I go about doing this? I was able to retrieve locations and revenues from it somehow and built a vector of store object, but I couldn't figure out how to retrieve Menu items (Menu items are different from location to location). I hope there is easier way to getting store object. Thanks in advance for your help.
[This message has been edited by Joon Park (edited July 29, 2001).]