Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #257 from thiagoabreu/fix_256
Browse files Browse the repository at this point in the history
Reading namespaces from attributes
  • Loading branch information
Jérémie Bertrand committed Aug 5, 2015
2 parents 6f26330 + 437f7a4 commit 360e0ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pretzel.Logic/Import/WordpressImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public void Import()
var xml = fileSystem.File.ReadAllText(pathToImportFile);
var root = XElement.Parse(CleanXml(xml));

XNamespace wp = "http://wordpress.org/export/1.1/";
XNamespace content = "http://purl.org/rss/1.0/modules/content/";
XNamespace wp = root.Attribute("{http://www.w3.org/2000/xmlns/}wp").Value;
XNamespace content = root.Attribute("{http://www.w3.org/2000/xmlns/}content").Value;

var posts = from e in root.Descendants("item")
select new WordpressPost
Expand Down

0 comments on commit 360e0ee

Please sign in to comment.