问题
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