Java tutorial
//package com.java2s; public class Main { /** * @comment_sp Saca XMLNamespace * @comment_ko removeXMLNamespace * @param source * @return */ public static byte[] removeXMLNamespace(byte source[]) { byte oldContent[] = new byte[source.length]; System.arraycopy(source, 0, oldContent, 0, source.length); String s = new String(oldContent); int startIndex = s.indexOf("xmlns"); int endIndex = s.indexOf(">", startIndex); StringBuffer sb = new StringBuffer(s); sb = sb.delete(startIndex - 1, endIndex); String input = new String(sb); return input.getBytes(); } }