PDA

View Full Version : ARGGG!!!! I can't read an XML correctly!



artsedge
07-24-2015,
I have been trying to populate a treeview control with an XML file for the longest, but I just can't get it to work correcty. Here is my XML content:

asvgghubju
07-26-2015,
Never knew you could do that, so I Googled (http://www.google.com/search?client=firefox-a&rls=org.mozilla&channel=s&hl=en&q=treeview+%2Bxml&btnG=Google+Search&aq=f) it.

Did you try the first result (http://support.microsoft.com/kb/317597)?

AustinWaf
07-27-2015,
Thanks for the sarcasm, it always puts a smile in my face. http://images.devshed.com/fds/smilies/bgtup000.gif

Yes, I have gone over pages and pages of Google results and none of the examples I have found, works for me. Maybe it has to do with the fact that my XML file is 6.3MB in filesize and has thousands of entries or records.

Here is a LINK (http://www.virtualaa.com/d-TPP_Metafile.xml) to the actual XML file. Perhaps you can take a look at it and see what would be the best approach, into loading this file. The problem I have with the Microsoft sample, is that when I execute the code, the application just hangs for minutes and does not respond. If I trim my XML file down to 1 or 2 records, then it works.

Maybe I did not explain myself better, but what I really want is to be able to do the following:

1. Show a list of STATES.
2. When you click on a state name, then it will show ONLY the city names for that state.
3. When you click on a city name, then it will show only the airport names for that city.
4. When you click on an airport name, then it will show only the records for that airport.

This way is better than having the application load the entire XML on application loading.

athgqmnogv
07-27-2015,
Ironically, while I'm usually quite sarcastic, I wasn't actually trying to be in this case http://images.devshed.com/fds/smilies/smile.gif

Anyway, I put together a little solution that should help guide you somewhat.

AudreisKi
07-28-2015,
lol It's ok! http://images.devshed.com/fds/smilies/biggrin.gif

Ok, I am at work now, but once I get home in the morning, I will give your code a shot. Thanks a million, I really do appreciate it. http://images.devshed.com/fds/smilies/bgtup000.gif