I just pushed a v0.2 of the DOM-to-XHTML conversion script.
-
New real-time XHTML editor! -- Type bad HTML into one textbox, see good XHTML come out the other textbox
-
Moved the function declarations to an object variable at window.xhtmljs
-
Fixed an "[object]" output bug where there is no text and no HTML tag name
-
Extended jQuery using .fn. rather than .prototype.
http://cachefile.net/scripts/xhtmljs/
In the next round of tweaks I'll clean the formatting logic as there are some indentation errors. Awfully handy, somehow I overlooked it.
Update: Ugh, a few more failures beyond indentation, namely some XHTML-accepted tags (like <input>) and attributes (like onxxxx event handlers) are still going missing in strict mode. The Editor should allow for the de-toggling of strict mode, and IMO I think enabling strict mode for the jQuery extension was a mistake. Also, plain-text ">" (> in markup) is not outputting as ">" but as ">".