Stackoverflow feed Linq to XML filtering -


i have xml:

<feed xmlns="http://www.w3.org/2005/atom" xmlns:creativecommons="http://backend.userland.com/creativecommonsrssmodule" xmlns:re="http://purl.org/atompub/rank/1.0"> <title type="text">recent questions - stack overflow</title> <link rel="self" href="http://stackoverflow.com/feeds" type="application/atom+xml" /> <link rel="alternate" href="http://stackoverflow.com/questions" type="text/html" /> <subtitle>most recent 30 stackoverflow.com</subtitle> <updated>2011-04-28t13:53:52z</updated> <id>http://stackoverflow.com/feeds</id> <creativecommons:license>http://www.creativecommons.org/licenses/by-nc/2.5/rdf</creativecommons:license>  <entry>     <id>http://stackoverflow.com/questions/5819742/how-do-i-run-a-slow-running-batch-asynchronously-specifically-a-svn-post-commit</id>     <re:rank scheme="http://stackoverflow.com">0</re:rank>     <title type="text">how run slow running batch asynchronously, svn post-commit?</title>     <category scheme="http://stackoverflow.com/feeds/tags" term="windows"/><category scheme="http://stackoverflow.com/feeds/tags" term="svn"/><category scheme="http://stackoverflow.com/feeds/tags" term="batch"/><category scheme="http://stackoverflow.com/feeds/tags" term="post-commit"/>     <author>         <name>digiguru</name>         <uri>http://stackoverflow.com/users/5055</uri>     </author>     <link rel="alternate" href="http://stackoverflow.com/questions/5819742/how-do-i-run-a-slow-running-batch-asynchronously-specifically-a-svn-post-commit" />     <published>2011-04-28t13:53:48z</published>     <updated>2011-04-28t13:53:48z</updated>     <summary type="html">         whatever1     </summary> </entry> <entry>     <id>http://stackoverflow.com/questions/5818592/wxpython-making-a-panel-not-accessible-through-tab</id>     <re:rank scheme="http://stackoverflow.com">0</re:rank>     <title type="text">wxpython making panel not accessible through tab</title>     <category scheme="http://stackoverflow.com/feeds/tags" term="wxpython"/><category scheme="http://stackoverflow.com/feeds/tags" term="wxglade"/>     <author>         <name>ccwhite1</name>         <uri>http://stackoverflow.com/users/588892</uri>     </author>     <link rel="alternate" href="http://stackoverflow.com/questions/5818592/wxpython-making-a-panel-not-accessible-through-tab" />     <published>2011-04-28t12:30:02z</published>     <updated>2011-04-28t13:53:34z</updated>     <summary type="html">         whatever 2     </summary> </entry> </feed> 

is portion of rss recents feeds stackoverflow.

i need entire xml (i'm using linq xml.), entrys "updated" atribute value lower or equal datetime passed parameter.

i xml way:

xdocument recientes = xdocument.load(obtenerfeedsrecientes()); recientes = recientes.root.elements().dontknowwhattodo(); 

can give me aproach in how ?

thank you!

xdocument recientes = xdocument.load(obtenerfeedsrecientes());  xnamespace atomns = "http://www.w3.org/2005/atom";  var updates = entry in recientes.root.elements(atomns + "entry")               datetime.parse(entry.element(atomns + "updated").value) <= parameter               select entry; 

should trick. assumes parameter of type datetime


Comments