Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script for converting html markup to valid XML

I have a WYSIWYG editor that builds HTML content. The tags are not always built as valid xml, and I need it to be valid xml. Does anyone have such a script? How would I do this?

like image 338
Will Du Avatar asked May 08 '26 08:05

Will Du


2 Answers

I'm not sure what language you are using on the server but you might want to look into the Html Agility Pack if you are using .NET

like image 186
detroitpro Avatar answered May 11 '26 05:05

detroitpro


It might be worth having a look at this .NET version of HTML Tidy: Tidy.NET

like image 45
Ian Oxley Avatar answered May 11 '26 05:05

Ian Oxley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!