Is there an online tool to convert XML code snippets to browser friendly html?
I just want to post my XML code to a forum for viewing purposes and nothing else but the TAGs mess up the HTML.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To display strings containing reserved characters in HTML (
<,>and&), you need to convert those characters into HTML entities.For example, the HTML entity for
<is<.There are tools in most languages for converting reserved HTML characters into entities. For example, in PHP, you can use the
htmlentities()function.You’ll need to tell us which language(s) you’re working with before I can give you any more language-specific advice though.
But in general, it’s just a case of replacing all instances of those three characters with their entity alternatives, so a fairly simple set of string replacements is all you really need.