c# - Remove attributes like width inside a style element -


i need remove width inside of style element, pref using html agility pack.

i tried using:

public static void removestyleattributes(this htmldocument html) {    var elementswithstyleattribute = html.documentnode.selectnodes("//@style");     if (elementswithstyleattribute!=null)    {       foreach (var element in elementswithstyleattribute)       {          element.attributes["style"].remove();       }    } } 

but have been unable target single element inside of style (since not want remove style entirely)


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -