Git Product home page Git Product logo

jumony's Issues

【建议】文档及设计更规范一点!

①一个小细节了,也可能是 Ivony 的个人习惯,所有的文档都不以句号(。)结尾,部分英文没有使用空格分隔,显得奇怪。
②一些成员应该设计成属性比较合理,但却设计成了方法(虽然属性本质上就是方法=_=),比如 InnerText() 设计成属性会更好,便于使用。

能否提供个强签名的Ivony.Html.Parser.Regulars.dll

因为用于COM 的时候非强签名dll 会报错。
只有这个Ivony.Html.Parser.Regulars.dll 没提供代码,不能自己加签。
用reflector 解码,加签,重新编译替代原来的。没有报错了,但是Find 不到任何东西。太扯了,搞了很久,所以能否提供个强签名的Ivony.Html.Parser.Regulars.dll 。

public static IEnumerable<IHtmlElement> Elements(this IHtmlContainer container, string selector) 不能识别选择器中的逗号语法

private void Button_Click_14(object sender, RoutedEventArgs e)
{
    var html =
        "<body>" +
            "<div>" +
                "<p><a id='1'>111</a></p>" +
                "<span><a id='2'>222</a></span>" +
                "<h><a id='3'>333</a></h>" +
            "</div>" +
            "this is text" +
            "<span>" +
                "<p><a id='4'>444</a></p>" +
                "<span><a id='5'>555</a></span>" +
                "<h><a id='6'>666</a></h>" +
            "</span>" +
        "</body>" +
        string.Empty;
    var doc = html.ParseAsHtml();
    var root = doc.Elements().First();
    var e1 = root.Elements();
    var e2 = root.Nodes();

    var e3 = root.Elements("div,span"); //只返回第一个div#div1
    //期望的行为同时是返回 div#div1 和 span#span1
    //这个期望行为与 jquery 的 $('body').children('div,span') 一致

    var e32 = root.Elements("span,div"); //只返回第一个span#span1

    var e4 = root.Find("div,span"); //正常
    var e42 = root.Find("span,div"); //正常,与e4结果一致
}

另外选择器的支持貌似还不全面,:root 和 :has 伪类就不受支持,doc.Find(":root") 会抛出异常提示“无法识别的伪类 root”,最麻烦的是 :no(selector) 伪类不支持。其他的伪类也有很多都不支持,下面链接页面中的伪类和其他选择器语法都有不支持的:

http://www.runoob.com/jquery/jquery-ref-selectors.html

解析属性值时出现Bug

对于标签内孤立的引号包裹起来的属性值中出现结束符时,应当解释为标签结束,而不是解释为属性值。

例如
<a href="1" "Test>"> Test</a>

Test后面的>字符应解释为标签结束。

Style().SetValue和Style().GetValue方法存在大小写问题

Style().SetValue和Style().GetValue方法存在大小写问题,比如:“<层 style="DISPLAY: none; "></层 >”
。Style().GetValue("display")取到的值为null,而Style().GetValue("DISPLAY")取值为none,同样Style().SetValue("DISPLAY","none").SetValue("display", "none")会出现两个值

请问一下,能支持.net 4.5吗?

最近在开发windows phone的应用程序,HtmlAgilityPack没办法用CSS或者XPath选择器。
Jumony添加nuget的引用,一运行到相关的代码就报错了。

CSS某些样式无法识别导致错误

static void test()

{

string strHTML = "<input name="660a3525-b274-2669-591e-8bd04ded968e" title="eeee" id="660a3525-b274-2669-591e-8bd04ded968e" style="border-width: medium medium 1px; border-style: none none solid; border-color: currentColor currentColor rgb(236, 236, 236); left: 149px; top: 73px; width: 100px; height: 20px; text-align: left; color: rgb(0, 0, 0); font-size: 12px; position: absolute; z-index: auto;" type="text" value="" RightKeyGetType="text" DesignerControl="yes" mydefaultvalue="" borderColor="" borderType="1">";

var document = new SystemParser().Parse(strHTML);

string s1 = document.Render();

var inputDoms = document.Find("input");

if (inputDoms != null)

{

foreach (var dom in inputDoms)

{

dom.Style().SetValue("display", null);

}

}

string s2=document.Render();

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.