Using html link in string within xml file

Viewed 19

I have an xml file that lists errors then calls them when the corresponding code gets triggered.

<?xml version="1.0" encoding="utf-8" ?>
 <ResultCodeToMessageMappings>
 <Mapping code="0" message="The credentials you have entered are invalid. Please contact this person" />

I'm trying to add html to the message to insert a link like:

<Mapping code="0" message="The credentials you have entered are invalid. Please visit: <a href="www.example.com">Help Page</a> "/>

But it shows up with the html in literal form as:

The credentials you have entered are invalid. Please visit: <a href="www.example.com">Help Page</a>

I'm just wondering if there's any correct way to do this? This would save me a lot of trouble instead of concatenating html onto the end of each instance of the error.

Thanks

1 Answers

You can look this
https://www.w3schools.com/xml/xml_xlink.asp

    <?xml version="1.0" encoding="UTF-8"?>
      <homepages xmlns:xlink="http://www.w3.org/1999/xlink">
         <homepage xlink:type="simple" 
         xlink:href="https://www.w3schools.com">Visit W3Schools</homepage>
         <homepage xlink:type="simple" xlink:href="http://www.w3.org">Visit 
         W3C</homepage>
      </homepages>
Related