It does that by converting the html to jQuery element, does the modifications on the jQuery element then the part which is not working is converting back to raw html string. Since .html() will not work with xml as indicated in the docs How can it convert the ) )(jQuery) Sign up for free to join this conversation on GitHub. Already have an account? table to. ul. and. li. elements. my table structure is.using. jquery. replaceWith. function as below. Here I firstly going to convert.