Hi I have this XML File which is generated to capture the logging information from a decompression action:
="1.0"="utf-8"
="1.0"="yes"
<NewDataSet>
<Error>
<transactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</transactionID>
<ErrorMessage />
<InnerException />
<StackTrace />
<Data />
</Error>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress />
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>Read First Directory</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>CoverageUpdate.aspx</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>CustomError.aspx</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>ExpandedCoverage.aspx</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>Global.asax</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>ListControlDispItems.xml</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>PremiumPolicyCoverageCodes.xml</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Data>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDateTimeStamp>2013-10-11T12:45:51.9099748+01:00</TransactionDateTimeStamp>
<FileToCompress>AICS_Client\wait.html</FileToCompress>
<DirectoryToCompress>C:\inetpub\CTSNGCFI</DirectoryToCompress>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<Action>De-Compress</Action>
</Data>
<Transaction>
<TransactionID>44c6e39a-9b94-4e2d-8419-597677a71dcf</TransactionID>
<TransactionDate>2013-10-11T13:45:51.9219748+01:00</TransactionDate>
<CompressedFileName>C:\inetpub\CTSNGCFI\CTSNGCFI.gz</CompressedFileName>
<TransactionSuccessFlag>true</TransactionSuccessFlag>
<TransactionErrors>No Errors</TransactionErrors>
</Transaction>
</NewDataSet>
From the above XML I'd like to extract the following information:
Transaction Date: 2013-10-11T13:37:47.3189748+01:00
Compressed File Name: C:\inetpub\AllstateCTSNGCFI\AllstateCTSNGCFI.gz
Transaction Success: true
Transaction Errors: No Errors
Decompressed Files(<filetocompress>):
CoverageUpdate.aspx
CustomError.aspx
ExpandedCoverage.aspx
Global.asax
bin\Allstate.CTS.SCDBPC.ProductCatalog.SCs.dll
etc
An
And if there are any errors, output the contents from the Error node.
Any help or pointers to tutorials that will help me would be greatly appreciated.