Java tutorial
//package com.java2s; public class Main { public static String nameWithoutNS(String tag) { if (tag == null) return null; int i = tag.lastIndexOf(":"); if (i > 0) { return tag.substring(i + 1); } else { return tag; } } }