Parse CSS out from <style> elements

Posted by awj on Stack Overflow See other posts from Stack Overflow or by awj
Published on 2010-06-08T15:56:09Z Indexed on 2010/06/08 16:02 UTC
Read the original article Hit count: 154

Filed under:
|
|
|

Can someone tell me an efficient method of retrieving the CSS between tags on a page of markup in .NET?

I've come up with a method which uses recursion, Split() and CompareTo() but is really long-winded, and I feel sure that there must be a far shorter (and more clever) method of doing the same.

Please keep in mind that it is possible to have more than one element on a page, and that the element can be either or .

© Stack Overflow or respective owner

Related posts about c#

Related posts about vb.net