i have this string
<div>
<p><strong>Elem_A</strong>String_A2_2 <String_A2_2> asdas</p>
<p><strong>Elem_B</strong>String_B2_2 String_B2_2</p>
</div>
and i want to covert it to
<div>
<p><strong>Elem_A</strong>String_A2_2 <String_A2_2/> asdas</p>
<开发者_StackOverflowp><strong>Elem_B</strong>String_B2_2 String_B2_2</p>
</div>
basically i want to autoclose any non html known tag , because i have problems with processing this html in htmlagilitypack as it changes the meaning of the html.
HTML (meaning not XHTML) already does this: auto closed tags are defined without a trailing closing /
(<br>
).
I'm not familiar with htmlagilitypack
, but if you make your own DTD based on HTML4.01, extended with your own tag, then there must be some HTML parser that can work.
Also, just curious, why are you using "special" tags within HTML?
精彩评论