Encoded HTML Characters

186 views Asked by At

First off, I am NOWHERE near an expert on HTML, I would be nervous to say I'm a novice, but II am currently working with some html being returned within a web service XML document. One of the stored values provides me with this HTML coding for our website which I am charged with modifying. As you can see, all of the code below has a bunch special characters which are being replaced with codes (i.e. &lt, etc). Is there a page anywhere that would do this translation for me if I were to write some code of my own or do I just have to suck it up, look up all of the character codes myself, and manually replace them? Also, if anyone knows what this is method of HTML is called, that would be helpful as well.

Thank you!

<tr id="CROW_355998">
<td nowrap   width="100px" style="text-align:right;padding-right:5px;background-color: #DDDDDD;">Bore Size</td>
<td  width="100%" style="background-color: #FFFFFF;"><select name="dom_355998" id="dom_355998" class="small" style="width: 100%;" onchange="setDomainValue(355998, this); formChange(355998);" >
<option value="" selected>-- Pick an Option --</option>
<option value="356023"  style="color: black; background-color: #FFFFFF">6mm</option>
<option value="356024"  style="color: black; background-color: #FFFFFF">10mm</option>
<option value="356025"  style="color: black; background-color: #FFFFFF">16mm</option>
</select>
</td>
<td width="18px" style="background-color: #FFFFFF; text-align: center;"><span style="display:none;" id="conf_355998"></span><span style="display:none;" id="confsoft_355998"></span><span onClick="showDomainMessages(355998, this, 'Status');"><img id="status_img_355998" src="images/NA/tilda_16.GIF" alt="Configuration Status" width="16" height="16" border="0" align="middle" title="Configuration Status"></span></td>
</tr>
<tr id="CROW_356002">
<td nowrap   width="100px" style="text-align:right;padding-right:5px;background-color: #DDDDDD;">Stroke</td>
<td  width="100%" style="background-color: #FFFFFF;"><input name="dom_356002" id="dom_356002" class="small" style="width: 100%;" onchange="setDomainValue(356002, this); formChange(356002);" >
<option value="" selected>-- Pick an Option --</option>
<option value="356026"  style="color: black; background-color: #FFFFFF">15mm</option>
<option value="356027"  style="color: black; background-color: #FFFFFF">30mm</option>
<option value="356028"  style="color: black; background-color: #FFFFFF">45mm</option>
<option value="356029"  style="color: black; background-color: #FFFFFF">60mm</option>
<option value="356030"  style="color: black; background-color: #FFFFFF">75mm</option>
<option value="356031"  style="color: black; background-color: #FFFFFF">100mm</option>
<option value="356032"  style="color: black; background-color: #FFFFFF">125mm</option>
<option value="356033"  style="color: black; background-color: #FFFFFF">150mm</option>
<option value="356034"  style="color: black; background-color: #FFFFFF">175mm</option>
<option value="356035"  style="color: black; background-color: #FFFFFF">200mm</option>
</select>
3

There are 3 answers

1
Anthony Faull On BEST ANSWER

There are plenty of sites that will XML encode a snippet of HTML for you.

For example:

0
Xorandnotor On
  • Add <html><body> to the start of the file
  • Add </body></html> to the end of the file
  • Save it as .html
  • View it in a browser
  • Select All
  • Copy/Paste
1
V-tech On

Make new HTML file (like c:\myfile.html) with following content:

<html><body>
the code you posted
</body></html>

Save it somewhere you can easily look it up in a browser. Point your browser to that file using something like file:///C:/myfile.html . Copy the contents showed in your browser and you get the HTML code you wanted.