Make method compatible to Java 1.6.
Code cleaning.
Make tag names case insensitive.
Restore test file.