How to read XML file in Angular 4, 5, 6 and get output as String?

为君一笑 提交于 2019-12-13 03:19:31

问题


I am using an angular 6 and I want to read XML file.

I have a sample file sample.xml to my local machine.

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

and I want to chose file and fetch all file data as String. ex. same file as String: <mail><to>abc@gmail.com</to><from>xyz@gmail.com</from><heading>Reminder</heading><body> Party this week !</body></mail>

来源:https://stackoverflow.com/questions/54867549/how-to-read-xml-file-in-angular-4-5-6-and-get-output-as-string

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