How to convert xml file to String in Angular 4, 5, 6?

白昼怎懂夜的黑 提交于 2019-12-24 19:40:42

问题


I have a xml file to my local and I want to choose file from local machine and just get outout as file in string. Sample Input file:

<mail>
    <to>abc@gmail.com</to>
    <from>xyz@gmail.com</from>
    <heading>Reminder</heading>
    <body> Party this week !</body>
</mail>

Expected output:

<mail><to>abc@gmail.com</to><from>xyz@gmail.com</from><heading>Reminder</heading><body> Party this week !</body></mail>

来源:https://stackoverflow.com/questions/54867683/how-to-convert-xml-file-to-string-in-angular-4-5-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!