how to read a xml file and write into list then get the path for txt file and read it

Drac

New Member
I am having a xml file.this having the path for my log file(txt).This xml file having some modules and each having the log file path.so i want to read the xml and list the details of each module then i want to read the txt file(using the path).can anyone please give some idea to do this stuff.Thanks,This is my xml file\[code\] <?xml version="1.0" encoding="utf-8" ?> <Modules> <ServiceHost> <LogType value="http://stackoverflow.com/questions/10831777/FatalErrorLog"> <Fields> <FileName>ServiceWS.log</FileName> <FileLocation>\\10.8.8.21\lv0\Logs\Prod\Service\</FileLocation> <IsLogFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDateFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDownloadRawFile value="http://stackoverflow.com/questions/10831777/false" /> </Fields> </LogType> <LogType value="http://stackoverflow.com/questions/10831777/DebugLog"> <Fields> <FileName>ServiceDebugWS.log</FileName> <FileLocation>\\10.8.8.21\lv0\Logs\Prod\ServiceHost</FileLocation> <IsLogFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDateFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDownloadRawFile value="http://stackoverflow.com/questions/10831777/false" /> </Fields> </LogType></ServiceHost><Product value="http://stackoverflow.com/questions/10831777/Debug"> <LogType> <Fields> <FileName>Product.log</FileName> <FileLocation>\\10.8.8.21\lv0\Logs\Prod\Endor\</FileLocation> <IsLogFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDateFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDownloadRawFile value="http://stackoverflow.com/questions/10831777/false" /> </Fields> </LogType></Product><Portal value="http://stackoverflow.com/questions/10831777/Debug"> <LogType> <Fields> <FileName>Portal.log</FileName> <FileLocation>\\10.8.8.21\lv0\Logs\Prod\SupportPortal\</FileLocation> <IsLogFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDateFilterAvailable value="http://stackoverflow.com/questions/10831777/true" /> <IsDownloadRawFile value="http://stackoverflow.com/questions/10831777/false" /> </Fields> </LogType></Portal><Modules>\[/code\]
 
Back
Top