Click here to Skip to main content
12,397,805 members (54,261 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
hi all..sorry if my english so bad..
i've learnt about parsing..but it was not enough..i've made a code to get value of attribute from "An Elementary HTML Parser"

and now i want to know how to get all html tags and attributes using c#..in this case i want get all tags and attributes not values of attributes..

ex: i want get html,body,src,alt,widht,height,etc.

thx before
Posted 27-Apr-11 8:07am
Updated 27-Apr-11 9:01am
v3
Comments
Monjurul Habib 27-Apr-11 15:02pm
   
Edited:link and words.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

This is the best open source HTML parser out there:

http://htmlagilitypack.codeplex.com/[^]

I strongly recommend it. I've used it, and it rocks!
  Permalink  
Comments
Manfred R. Bihy 27-Apr-11 16:29pm
   
Absolutely! 5+
I must say I love this library.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

html documents based on xml meta languages . i think to solve this problem using System.XML namespace to search elements in document or using LINQ to XML
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 27 Apr 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100