html-agility-pack icon indicating copy to clipboard operation
html-agility-pack copied to clipboard

Immutable transformation of HTML document tree

Open riyadparvez opened this issue 7 years ago • 2 comments

Transformations list here: http://html-agility-pack.net/manipulation are not immutable transformation. It's very useful to have the original document tree intact and provide immutable transformation to return newly modified tree.

riyadparvez avatar Jul 28 '17 14:07 riyadparvez

Hello @riyadparvez ,

I will look at this, but I'm not sure if we will implement it or not this features before the V2.x

I will let you know more very soon regarding this subject probably before Monday.

Best Regards,

Jonathan

JonathanMagnan avatar Jul 28 '17 19:07 JonathanMagnan

Hello @riyadparvez ,

We do not plan in short-term to support immutable transformation however you can clone the DocumentNode and work on it. So you will still keep a reference to the original document tree.

var cloned = doc.DocumentNode.Clone();

Let me know if that answer successfully to your request.

Best Regards,

Jonathan

JonathanMagnan avatar Jul 28 '17 20:07 JonathanMagnan