I want to show raw XML data with tags in Popups like Bootstrap Modal, BootBox, jAlert, SweetAlert2, or SweetAlert.
But when I feed the raw XML data, those libraries only show the content inside the tags.
I want something like
<Account>
<Name>Customer Name</Name>
<Balance>Current Balance</Balance>
</Account>
But those libraries show only
Customer Name
Current Balance
Only the default alert dialog box shows the content with XML tags.
I was trying to fix this issue by replacing using jQuery
< with < and > with >
But my team lead says not to change any data by any means.
Is there any plugin or any way to show raw XML with a beautiful alert box?
To answer the question asked in your title,
Yes, the default JavaScript
alert(),will show raw XML data:
See also