From 064dc32bbab49ebbe68b19c320e3f761bee75919 Mon Sep 17 00:00:00 2001 From: Julian Hu Date: Wed, 20 Dec 2017 13:21:11 +0800 Subject: [PATCH] change xml root for new export file format --- .gitignore | 3 ++- .../MicrosoftKeysExportFileFormatProvider.cs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 82d285a..25c37a3 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,5 @@ _ReSharper*/ ~$* #NuGet -packages/ \ No newline at end of file +packages/ +/.vs/MicrosoftKeyImporterPlugin/v15/Server/sqlite3 diff --git a/MicrosoftKeyImporterPlugin/MicrosoftKeysExportFileFormatProvider.cs b/MicrosoftKeyImporterPlugin/MicrosoftKeysExportFileFormatProvider.cs index 5ed9e6f..70370e4 100644 --- a/MicrosoftKeyImporterPlugin/MicrosoftKeysExportFileFormatProvider.cs +++ b/MicrosoftKeyImporterPlugin/MicrosoftKeysExportFileFormatProvider.cs @@ -24,9 +24,10 @@ public override void Import(PwDatabase pwStorage, System.IO.Stream sInput, IStat var document = new XmlDocument(); document.Load(sInput); - var root = document.DocumentElement; - var products = root.SelectNodes("Product_Key"); + + var root = document.DocumentElement.SelectSingleNode("YourKey"); + var products = root.SelectNodes("Product_Key"); if (products == null || products.Count == 0) return;