Using Schema for HTML Parsing: Over-Engineering or Anti-Pattern?

Is it over-engineered or an anti pattern to use Schema when attempting to parse HTML ?

My use cases are that I need to build domain entities/value objects out of mostly HTML strings + a bit of metadata (urls, etc.).
The HTML parsing per se would be done using an HTML parser (no regexp), and somehow I feel it natural to wrap this using Effect Schema. There are several things that can fail when parsing HTML and I don't want to reinvent the wheel regarding error handling.

Obviously I can only implement the decode function and I will never have to implement the encode function since I really only care about extracting data out of HTML strings.

Is that an anti pattern?
Was this page helpful?