i'm trying to do a string comparison in a XmlDocument, and the following is what i tried. I am wondering why the first 2 yield the right result, and the last 2 doesn't return any result.
What i was trying to do is to filter out nodes based on a datetime string. Like the last example i have.
thanks,
XmlNodeList test = x2PathDoc.SelectNodes("//config
/pendingversion
[@versionconfigid > 1002002]");
XmlNodeList test2 = x2PathDoc.SelectNodes("//config
/pendingversion
[@versionconfigid >'1002002']");
XmlNodeList test3 = x2PathDoc.SelectNodes("//config
/pendingversion[@test > 'b']");
XmlNodeList test4 = x2PathDoc.SelectNodes("//config
/pendingversion
[@deploydatetime >
'2010-12-19T03:25:00-08:00']");
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…