摘要:
今儿给网友讲解了一个判等的问题,看似简单,其实还是蛮有意思的:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->objects=1,t=1;Console.WriteLine( "s==t->{0}",s==t );Console.WriteLine( "s.Equals(t)->{0}",s.Equals( t ) );//运行结果://s==t->False//s.Equals(t) 阅读全文
随笔档案-2011年01月
SgmlReader使用小记
2011-01-21 22:29 by 贼寇在何方, 1205 阅读, 收藏,
摘要:
在做一个定期检测Html页面中固定链接的小工具,需要把Html转换成规范的XML,然后用XPath进行访问这里就需要用到SgmlReader这个类库SgmlReader可以用来解析HTML/SGML,并能把不规范的Html转换成规范的XHtmlstring SgmlTranslate(string input){ var reader = new SgmlReader(); reader.DocType = "HTML"; reader.WhitespaceHandling = WhitespaceHandling.None; reader.CaseFolding = Sg 阅读全文
浙公网安备 33010602011771号