Java tutorial
//package com.java2s; /*********************************************************************************************************************** * Copyright (c) 2008 empolis GmbH and brox IT Solutions GmbH. All rights reserved. This program and the accompanying * materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: brox IT-Solutions GmbH - initial creator **********************************************************************************************************************/ public class Main { /** * This method converts a given XML attribute or element name to a local representation by stripping it of its * namespace prefix. * * * @return String * @param xml * - */ public static String getLocalPart(String xml) { final int pos = xml.indexOf(":"); if (pos >= 0) { xml = xml.substring(pos + 1); } return xml; } }