Simple Entity Converter

I found myself needing a simple entity conversion tool when working with XML files. Not finding exactly what I needed online I finally broke down and created my own. I refined it a bit and posted it up.

Check it out: Simple Entity Converter

Update: 12/18/07

I have been doing a little tweaking:

  1. Minor updates to the layout
  2. Broke the entity list into two groups, the predefined XML set and all the rest. I found converting the core XML entities can come in handy.
  3. I made the entity list selectable so now you can check the entities you would like to convert
  4. Added some toggle controls for each group so its easy to select or deselect them all.

Note: Conversion starts to get a little bit dicey at super high code points. Starting at about 900+, unless the character is listed in the selection table on the right it will automatically be translated to its numbered entity. I’m working on it.



Prototype 1.6: Observe “contentloaded” changed to “dom:loaded”

This one caught me off guard. After upgrading from Prototype 1.6 RC0 straight to the final release I found that all my custom JavaScript code simply lay there dormant. Fighting off panic I did some quick googling and ran across this post detailing how custom events are now namespaced. Hopefully this post helps others out there who find themselves in the same situation.

?View Code JAVASCRIPT
//Wrong
document.observe("contentloaded", function () {...});
 
//Right
document.observe("dom:loaded", function () {...});