login about faq

Does your HTML to XML Conversion Library support HTML5?

Do you plan to provide support?

asked Oct 14 '13 at 12:27

chilkat's gravatar image

chilkat ♦♦

HTML5 is intended to subsume not only HTML 4, but also XHTML 1 and DOM Level 2 HTML. ( http://en.wikipedia.org/wiki/HTML5 )

Therefore, given that XHTML is just an application of XML (just like other things are applications of XML, such as a SOAP request), it follows that any HTML5 document is already an XML document.

The purpose of the HTML-to-XML conversion is to convert HTML that may not already be valid XML, into valid XML so that it may be parsed programmatically. Part of the benefit is for errors, non-terminated tags, etc. to be automatically fixed in a reasonable way as to maintain the original intended structure. In addition, the text becomes encapsulated in "text" nodes.

If you already have HTML5, then technically there's no need to convert to XML because you already have XML. If however, you have a mixture of HTML and HTML5, and wish to parse all of these documents in the same way, then you could certainly convert all to XML using Chilkat HTML-to-XML. The only benefit to converting the HTML5 is that the text will be broken out into "text" nodes.


answered Oct 14 '13 at 12:39

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 14 '13 at 12:27

Seen: 2,487 times

Last updated: Oct 14 '13 at 12:39

powered by OSQA