$html to xhtml

Allows you to convert HTML to XHTML.


Running this code will set the variable "#htmlCode" with the following value:

<html><head><TITLE>title</TITLE></head><body>I♥NY<p>b<br>c:±<img src=2 nonsense=x></a><font size=2>c</font></body></html>

After, "htmlCode" will be converted to XHTML with the following properties:

  • Option: XHTML
  • Doc Type: Auto
  • Input Encoding Name: UTF-8
  • Output Encoding Name: UTF-8
  • Line Length: 0
  • Tab Length: 0
  • Preserve Whitespace in Comments: True
  • Convert CDATA: False
  • Compact Block Elements: False
  • Compact Empty Element Tags: False
  • Always Empty Element Tags: False
  • DOS End of Line: False
set(#htmlCode,"<html><head><TITLE>title</TITLE></head><body>I♥NY<p>b<br>c:±<img src=2 nonsense=x></a><font size=2>c</font></body></html>","Global")
set(#xHTML,$plugin function("Document Automation.dll", "$html to xhtml", #htmlCode, "Xhtml", "Auto", "utf-8", "utf-8", 0, 0, "True", "False", "False", "False", "False", "False"),"Global")

Was this helpful?

Previous Article

$html to markdown

Next Article

$html to xml