Code example for Element

Methods: getLocalName, getNamespaceURI

0
    public static BpelObjectFactory getInstance() { 
        return __instance;
    } 
 
    public BpelObject createBpelObject(Element el, URI uri) {
        QName type = new QName(el.getNamespaceURI(), el.getLocalName());
        Class cls = _mappings.get(type);
        if (cls == null) {
            __log.warn("Unrecognized element in BPEL dom: " + type);
            return new BpelObject(el);
        } 
        try { 
            Constructor ctor = cls.getConstructor(__CTOR);
            BpelObject bo =(BpelObject) ctor.newInstance(new Object[]{el});
            bo.setURI(uri);
            return bo;
        } catch (Exception ex) {
            throw new RuntimeException("Internal compiler error", ex);
        } 
    }