{"id":1113,"date":"2023-02-16T08:35:24","date_gmt":"2023-02-16T08:35:24","guid":{"rendered":"https:\/\/www.tools.keywordfinder.us\/?page_id=1113"},"modified":"2023-02-16T08:35:24","modified_gmt":"2023-02-16T08:35:24","slug":"text-to-html","status":"publish","type":"page","link":"https:\/\/tools.billionsideas.com\/fr\/text-to-html\/","title":{"rendered":"Text To HTML"},"content":{"rendered":"<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column has-base-3-background-color has-background is-layout-flow wp-block-column-is-layout-flow\">\n<section><div id=\"converter\">\n  <h1>Text to XML Converter<\/h1>\n  <input type=\"file\" id=\"fileInput\" accept=\".txt\" onchange=\"uploadFile()\"><br><br>\n  <textarea id=\"textInput\"><\/textarea><br>\n  <button onclick=\"convertToXML()\">Convert to XML<\/button>\n  <a id=\"downloadLink\" download=\"converted.xml\"><\/a><br><br>\n<\/section>\n\n\n\n<script>\nfunction uploadFile() {\n  var file = document.getElementById(\"fileInput\").files[0];\n  var reader = new FileReader();\n  reader.onload = function () {\n    document.getElementById(\"textInput\").value = reader.result;\n  };\n  reader.readAsText(file);\n}\n\nfunction convertToXML() {\n  var text = document.getElementById(\"textInput\").value;\n  \/\/ Perform the conversion from text to XML here\n  var parser = new DOMParser();\n  var xmlDoc = parser.parseFromString(text, \"text\/xml\");\n  var xmlText = new XMLSerializer().serializeToString(xmlDoc);\n  var link = document.getElementById(\"downloadLink\");\n  link.href = \"data:application\/xml,\" + xmlText;\n  link.innerHTML = \"Download XML\";\n}\n\n<\/script>\n\n\n<style>\n     section{\n         margin-top:60px;\n        width: 100%;\n        max-width: 970px;\n        background-color: #fff;\n        border: 1px solid #ddd;\n        padding: 25px;\n      }\n<\/style>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Text to XML Converter Convert to XML<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":""},"class_list":["post-1113","page","type-page","status-publish"],"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"Billions Ideas","author_link":"https:\/\/tools.billionsideas.com\/fr\/author\/loginbillionsideas-com\/"},"comment_info":0,"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/pages\/1113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/comments?post=1113"}],"version-history":[{"count":0,"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/pages\/1113\/revisions"}],"wp:attachment":[{"href":"https:\/\/tools.billionsideas.com\/fr\/wp-json\/wp\/v2\/media?parent=1113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}