XmlDocument filter nodes by datetime string

Posted by Eatdoku on Stack Overflow See other posts from Stack Overflow or by Eatdoku
Published on 2010-12-21T17:42:22Z Indexed on 2010/12/21 17:54 UTC
Read the original article Hit count: 260

Filed under:
|

Trying to apply filter / attribute comparison in the Xmldocument. Obviously , the following code snippet wouldn't work because the expression can't be converted using number() function. (according to the answer of my other question).

I'm wondering if there is a way to do the DateTime string comparison in XmlDoc.

XmlNodeList test = x2PathDoc.SelectNodes("//Config
                                         /Entity
                                           [@TargetDateTime> 
                                            '2010-12-19T03:25:00-08:00']");

© Stack Overflow or respective owner

Related posts about .NET

Related posts about xmldocument