Document.documentnode.selectnodes ul id threads li tolist hướng dẫn
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account Closed serdam55 opened this issue Apr 21, 2018 · 10 comments Assignees
Comments
I just start to write a new application with Net Core 2.0 and I have this structure: the ConsoleApp import the Library reference that is a dll, and Library import When I run the ConsoleApp, I get this error: Unhandled exception of type 'System.IO.FileNotFoundException' in Library.dll Could not load file or assembly 'HtmlAgilityPack, Version=1.8.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a'. The specified file could not be found. The file is available, as you can see in the image: The text was updated successfully, but these errors were encountered:
Hello @serdam55 , I just tried the v1.8.0 from NuGet and everything works fine. I believe your issue may be more related to some weird NuGet issue we get sometimes.
There is not so much we can do on our side for this kind of issue since it's not related directly to the library. Let me know if one of these solutions worked. Best Regards, Jonathan
Hello @serdam55 , We have released the v1.8.1. Perhaps we had an issue on our side with a file assembly that we forgot to update the version. Let me know if that's working with the newest version. Best Regards, Jonathan
@JonathanMagnan Yes, now is fixed! Thank you for this amazing library!! :) Could I ask a question here? It's ot, well I try, anyway, suppose I have the following list: how can I get the first a tag for each li? I tried using: but this return null, the result should be: foo, foo3 Thanks again :) Hello @serdam55 , Here is an example to get you started to get the first var html1 = @" Hope that helped ;) Best Regards, Jonathan What about using the @JonathanMagnan well I also get 2018/2019 if I use this: Of course you will get Look at the number of slash between my string and your ;)
0 has not the same behavior as
1. Using two slashes will check from the root instead of the current element. HtmlNodeCollection compsLi = compsDiv.SelectNodes("//ul[@class='left-tree']/li/a"); @JonathanMagnan you're indeed right! Thanks for the support. What's the difference against "/" and "//"? Are this things available in the documentation? I not able to find that, thanks again :) We are currently writing some
2 documentation. It will be available in around 2 months probably. |