Skip to content

Commit

Permalink
Reading namespaces from attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagojedi committed Jul 29, 2015
1 parent bb19859 commit 437f7a4
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 437f7a4

Please sign in to comment.