Euzinho Dassilva Advanced Cheater
Reputation: 0
Joined: 08 Sep 2007 Posts: 62
|
Posted: Sun Nov 04, 2007 4:28 pm Post subject: ListView and XML |
|
|
Well, I'm here again
Display lots of information in a TreeView it's not a good way, then I want (or I hope to want ^^) display in a List View.
But, the information area in a XML file and I can't add programatically.
I found a class that reads from a TXT file, separated by commas. Ugly!
Then, anyone can help me with a class (or routines) to do this: populate a TreeView with XML, no mattering the hierarchy levels?
I tried this one
Works fine, but don't read "sub-levels", then XMl's like:
| Code: | <level>
<content>Test</content>
</level> |
Don't works FOR ME, because no error occur
Thanks
[EDIT]
I found a code in a Russian Site that works in parts.
The compiled version(EXE) of package reads all XML tags of file, makes headers and shows items. But, if open the .vbproj file, the instruction:
| Code: | | lvitem.SubItems.Add(reader.Value) |
is underlined with green the lvitem word, because I need an object instance.
But if I create a object instance, the code don't show nothing. And if I comment the Else that contains this line, only the first tag values are presented.
[SECOND EDIT]
Now works fine. I only need change the line:
| Code: | | Dim lvitem As ListViewItem |
To
| Code: | | Dim lvitem As New ListViewItem() |
Instantiating the object before all |
|