Java XML QName splitQName(String qualifiedName)

Here you can find the source of splitQName(String qualifiedName)

Description

split Q Name

License

Open Source License

Declaration

public static String[] splitQName(String qualifiedName) 

Method Source Code

//package com.java2s;

import javax.xml.XMLConstants;

public class Main {
    public static String[] splitQName(String qualifiedName) {
        if (qualifiedName == null) {
            throw new IllegalArgumentException("Null QName");
        }/*from www.j a  v  a2 s  . co  m*/
        int idx = qualifiedName.indexOf(':');
        String[] parts = { null, null };
        if (idx >= 0) {
            parts[0] = qualifiedName.substring(0, idx);
            parts[1] = qualifiedName.substring(idx + 1);
        } else {
            parts[0] = XMLConstants.DEFAULT_NS_PREFIX;
            parts[1] = qualifiedName;
        }
        return parts;
    }
}

Related

  1. resolveQName(String qNameWithPrefix, Element element)
  2. search(List list, Element baseElement, QName nodeName, boolean recursive)
  3. serializeJavaToXml(QName qname, Serializable value)
  4. serializeQName(QName qName)
  5. setValue(java.util.Map map, String name, String newValue)
  6. stringToQName(XMLStreamReader reader, String text, String defaultNS)
  7. toJavaName(QName xmlName)
  8. uniqueQName(QName q)
  9. uriToQName(String uri)