No, ConvertTo-XML isn’t right, and once you parse as XML it won’t “display” at all. It’s an object hierarchy. If your HTML document is in $html, you’d do “[xml]$xml = $html” to attempt to parse the HTML as XML and create an XML object model. If it errors, then the HTML isn’t compliant with XML standards (which isn’t unusual – HTML isn’t exactly the same as XML, although they’re close).
↧