Search XML file with linq, get nodes that match to subnodes

snatcheater24

New Member
I have a xml file with the following structure:\[code\]<Packages> <Package> <Name>Package1</Name> <Dependencies> <Dependency>Package2 </Dependency> </Dependencies> </Package> <Package> <Name>Package2</Name> <Dependencies> <Dependency>Package3</Dependency> </Dependencies> </Package> <Package> <Name>Package3</Name> <Dependencies /> </Package></Packages>\[/code\]I want to parse the xml file, and print out the dependency "flow".For example:\[code\]Package1 -> Package2 -> Package3Package2 -> Package3Package3\[/code\]The purpose is to create a "sequence" that will install applications, the commands should be stored in a xml file. A package could have dependencies.Can I use linq to solve this problem?I don't need a complete solution, just a hint in right direction.
 
Back
Top