* @see org.apache.axiom.om.OMFactory#createOMElement( javax.xml.namespace.QName,
* org.apache.axiom.om.OMContainer)
*/
public OMElement createOMElement(QName qname, OMContainer parent)
throws OMException {
NamespaceImpl ns;
if (qname.getNamespaceURI().length() == 0) {
ns = null;
} else if (qname.getPrefix() != null) {
ns = new NamespaceImpl(qname.getNamespaceURI(), qname.getPrefix());
} else {
ns = new NamespaceImpl(qname.getNamespaceURI());
}
return createOMElement(qname.getLocalPart(), ns, parent);
}