Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

MohammadRSZ

@MohammadRSZ
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to select nodes via HtmlAgilityPack?
    M MohammadRSZ

    thanks for your reply Could you tell me how can I add the breakpoint in doc?

    C# csharp com regex xml tutorial

  • How to select nodes via HtmlAgilityPack?
    M MohammadRSZ

    I have just practise to grab some data from a web page.
    Of course, I am new in c#.
    I am using regex but it does not word. and return null.

    using HtmlAgilityPack;

    namespace ConsoleApp1
    {
    
    
        class Program
        {
            static void Main(string\[\] args)
            {
                HtmlWeb web = new HtmlWeb();
                HtmlDocument doc = web.Load("https://www.videoblocks.com/video/after-effects-cs5-template-bracket-titles-65zdx8e");
    
                var title = doc.DocumentNode.SelectNodes(xpath: "//ul\[@class='stockItemInfo-stockSpec'\]").FirstOrDefault().InnerText.Split(':').FirstOrDefault();
                var secp = doc.DocumentNode.SelectNodes("//ul\[@class='stockItemInfo-stockSpec'\]//li//span").FirstOrDefault().InnerText;
    
    
                Console.Write(title+":"+secp);
                    Console.ReadKey();
            }
        }
    }
    
    C# csharp com regex xml tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups