Here you can find the source of getQNameFromSerialzedForm(String qNameAsString)
public static QName getQNameFromSerialzedForm(String qNameAsString)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008, 2012 IBM Corporation, University of Stuttgart (IAAS) and others. * 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:/*from w w w . ja v a2s. c om*/ * IBM Corporation, University of Stuttgart (IAAS) - initial API and implementation *******************************************************************************/ import javax.xml.namespace.QName; public class Main { public static QName getQNameFromSerialzedForm(String qNameAsString) { int pos = qNameAsString.lastIndexOf("}"); //$NON-NLS-1$ String ns = qNameAsString.substring(1, pos); String name = qNameAsString.substring(pos + 1, qNameAsString.length()); QName qName = new QName(ns, name); return qName; } }