Click here to Skip to main content
Rate this: bad
good
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 9:07am
Edited 27-Apr-11 10:01am
v3
Comments
Monjurul Habib at 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 at 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
0 OriginalGriff 499
1 Maciej Los 325
2 Sergey Alexandrovich Kryukov 234
3 DamithSL 233
4 Mathew Soji 195
0 OriginalGriff 7,168
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,461
3 Manas Bhardwaj 4,876
4 Maciej Los 4,450


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 27 Apr 2011
Copyright © CodeProject, 1999-2014
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