but otoh, if you try to reinvent something instead of using a tried &amp; true library, you might as well just add new bugs.<p>I.e. I&#x27;d 100% use libxml to sanitize xml rather than trying and reimplementing xml parsing myself.<p>As always, trade offs.