Delphi - xml - listview and groups

EvilWind

New Member
I'm trying to populate an xml file into a Delphi ListView1, then "group" all the [items and subitems] by a [tag] defined in the xml file under the Category section, I'm trying to make my program have a "tag" system so similar software will be grouped by a common tag, I'm open to suggestions if its not possible with listview then I can use other components to like VirtualStringTree, easylistview ..etc, this program is for my personal use, I'm just curious from a learning point of view since I have seen no other examples on how to accomplish this.so for the xml listed below it should look like\[code\]ListView1TAG1 [Each tag name in the category, this would be a group]- New Item 1 <- Category name -Copy of File <- subitem software name- bin [This is another category but it has TAG1 so group it with TAG1 items]TAG4 [Each tag name in the category, this would be a group]- New Item 1 <-this is the same as TAG1, add it to the TAG4 group since its in tags] -Copy of File <- subitem software of category\[/code\]here is a sample of my xml file.\[code\]file.xml<Category><Category name="New Item 1" Tags="TAG1 TAG4"/> <Software name="Copy of File" Tags=""> <PathCache>data\cache\945.ico</PathCache> <PathExe>$Drive\Development\file.exe</PathExe> </Software><Category name="bin" Tags="TAG1"> <Software name="Copy of File" Tags=""> <PathCache>data\cache\947.ico</PathCache> <PathExe>$Drive\Development\file.exe</PathExe></Software><Software name="softwaretitle" Tags=""> <PathCache>data\cache\946.ico</PathCache> <PathExe>$Drive\Development\test.exe</PathExe> </Software> </Category> </Category>\[/code\]I added the tags="" section to the Category section in the xml file, I can rewrite it if needed to\[code\] <Category name="New Item 1"/> <Tags>Tag1 Tag4</tag>\[/code\]
 
Back
Top