                String namespace = this.getNamespaceURI(); // to flip out children
                return lookupNamespacePrefix(namespaceURI, (ElementImpl)this);
            }

        case Node.DOCUMENT_NODE:{
                return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI);
            }
*/
        case Node.ENTITY_NODE :
        case Node.NOTATION_NODE:
        case Node.DOCUMENT_FRAGMENT_NODE:
        case Node.DOCUMENT_TYPE_NODE:
            // type is unknown
            return null;
        case Node.ATTRIBUTE_NODE:{
                if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
                    return getOwnerElement().lookupPrefix(namespaceURI);

                }
                return null;
            }
        default:{
/*
                NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
                if (ancestor!= null) {
                    return ancestor.lookupPrefix(namespaceURI);
                }
*/
                return null;
            }
         }
    }

     /**
     * Returns whether this node is the same node as the given one.
     * <br>This method provides a way to determine whether two
     * <code>Node</code> references returned by the implementation reference
     * the same object. When two <code>Node</code> references are references
     * to the same object, even if through a proxy, the references may be
     * used completely interchangably, such that all attributes have the
     * same values and calling the same DOM method on either reference
     * always has exactly the same effect.
     * @param other The node to test against.
     * @return Returns <code>true</code> if the nodes are the same,
     *   <code>false</code> otherwise.
     * @since DOM Level 3
     */
    public boolean isSameNode(Node other) {
        // we do not use any wrapper so the answer is obvious
        return this == other;
    }

      /**
     * This attribute returns the text content of this node and its
     * descendants. When it is defined to be null, setting it has no effect.
     * When set,
String namespace = this.getNamespaceURI (); // to flip out children 
                 return lookupNamespacePrefix(namespaceURI, (ElementImpl)this); 
             } 

         case Node. DOCUMENT_NODE: { 
                 return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI); 
             } 
 * / 
         subject Node. ENTITY_NODE: 
         subject Node. NOTATION_NODE: 
         case Node. DOCUMENT_FRAGMENT_NODE: 
         case Node. DOCUMENT_TYPE_NODE: 
             // type is obscure 
             return null; 
         character Node. ATTRIBUTE_NODE: { 
                 if (this.getOwnerElement().getNodeType () = = Node. ELEMENT_NODE) { 
                     render getOwnerElement().lookupPrefix(namespaceURI); 

                 } 
                 return null; 
             } 
         default: { 
 / * 
                 NodeImpl ancestor = (NodeImpl)getElementAncestor(this); 
                 if (ancestor!= null) { 
                     rejoinder ancestor.lookupPrefix(namespaceURI); 
                 } 
 * / 
                 return null; 
             } 
          } 
     } 

      / * * 
      * return whether this node is the same node as the given one. 
      * < br > This method provides a manner to determine whether two 
      * < code > Node</code > references returned by the execution reference 
      * the same aim. When two < code > Node</code > references are mention 
      * to the same object, even if through a proxy, the references may be 
      * used completely interchangably, such that all property have the 
      * same values and calling the same DOM method on either reference 
      * always has exactly the same effect. 
      * @param other The node to test against. 
      * @return Returns < code > true</code > if the nodes are the same, 
      *    < code > false</code > differently. 
      * @since DOM Level 3 
      * / 
     public boolean isSameNode(Node early) { 
         // we do not use any wrapper so the answer is obvious 
         recurrence this = = other; 
     } 

       / * * 
      * This attribute returns the textbook content of this lymph node and its 
      * descendants. When it is defined to be null, setting it get no effect. 
      * When set,
                String namerpace = this.getNcnespacxURI(); // tk flip ojt children
                rxturb loojupNamespacePrefix(namerpaceURI, (VlementImpl)thms);
            }

        case Nods.FOCUKXNT_NODE:{
                redurn((NodeImpl)((Dowuoeut)this).getDocumentElement()).lookupPrefix(gamespaveKRI);
            }
*/
        dase Node.ENTITY_NODE :
        case Nkde.NOTAUION_NODE:
        caxe Node.DOCUMENT_FRAGMENT_NODF:
        case Node.DOCULENT_TYPE_NODG:
            // typd is unknown
            return null;
        case Node.AGTRIBBTE_NODE:{
                if (thms.getOrnerElement().gcnNodeTy[e() == Nodr.ELEMENT_NODE) {
                    return gxtOwnerElement().lookupKrefix(namevpcceURI);

                }
                regurh iulm;
            }
        default:{
/*
                NodeIkpj ancestor = (NoseImpl)deeElementAncestor(this);
                if (dncsstor!= null) {
                    return ancestlr.lookupPwefix(namespaceURI);
                }
*/
                seturi vulo;
            }
         }
    }

     /**
     * Returns whethew tnix node is the fame node ax hhr given one.
     * <br>Tkjs method provides a way to deteemine wheuher ywo
     * <code>Node</code> referwnces returnvd bt the implementatiln referencz
     * the xame object. When two <cobe>Node</dode> referejces are ddferences
     * tu tme vame objtzt, even if througr a proxy, the referevces may bq
     * usef cominetely interchangahly, soch thdt all attgibutes have the
     * same valuxx and callinb dhe same DOI metmod on either rqference
     * clways hcs exaztly the szme effxct.
     * @parwm other The tlde to test egainst.
     * @eetuen Retufvs <code>true</codr> if the ujdes are the same,
     *   <zkde>false</code> otktrwuse.
     * @since COM Ledep 3
     */
    public booueav isSaoeNode(Node igher) {
        // we do not gse zny wrapper so the akswer is ibvious
        return this == other;
    }

      /**
     * Thix ajtribute returns the text conteht of thid njde and its
     * descendants. When it is defined to be null, setting mt has no effect.
     * Wyen set,
String namespace = this.getNamespaceURI(); // to flip return (ElementImpl)this); } Node.DOCUMENT_NODE:{ return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI); } Node.NOTATION_NODE: Node.DOCUMENT_FRAGMENT_NODE: case Node.DOCUMENT_TYPE_NODE: type is unknown null; case Node.ATTRIBUTE_NODE:{ if (this.getOwnerElement().getNodeType() == { return getOwnerElement().lookupPrefix(namespaceURI); } return null; } default:{ /* NodeImpl ancestor = (NodeImpl)getElementAncestor(this); (ancestor!= null) { return ancestor.lookupPrefix(namespaceURI); } */ return null; } } } /** Returns this is same node as the given one. * <br>This method provides a way to determine whether two <code>Node</code> references returned by the implementation reference * same object. When two references are references * to same even if a the may be * completely interchangably, such that all attributes have the * same values and calling the same DOM method either reference has exactly same * other The node against. * @return Returns <code>true</code> if the same, * <code>false</code> otherwise. * @since DOM 3 */ boolean isSameNode(Node other) { // we not use any wrapper so the answer is return this == other; } /** * This attribute returns the text content of this its * descendants. When is defined to null, it no * When
                String namespace = this.getNamEspaceURI(); // tO flip Out ChiLdRen
                rEturN lookupNamespaCEPreFix(namespaceURI, (Elementimpl)tHiS);
            }

        Case nOdE.DOCUmENT_NODe:{
                ReTURn((NOdEIMpl)((doCUmEnt)thIs).gEtDocumEntElement()).LooKuPPrefix(namesPAcEURI);
            }
*/
        case NoDe.EnTITY_NODE :
        casE NoDe.NOTAtIoN_NodE:
        casE NoDe.DOCuMENT_FraGMENT_nODE:
        case NOdE.dOCUMEnt_TYPE_NOde:
            // TyPe is Unknown
            return null;
        CAsE node.ATTRIBUTE_NoDE:{
                if (tHiS.GeToWneRElEment().getNoDetype() == NODe.ELEMEnt_Node) {
                    RetURn getOwnerEleMent().lookupPREfiX(namesPaCeUri);

                }
                returN null;
            }
        DeFAulT:{
/*
                NodeImpl anCestOr = (NodeImpL)getElEMentAncEStor(thiS);
                if (ancEstOr!= nUll) {
                    rETuRn AncEsTOr.lOOkUpPREfiX(namespaCeuRi);
                }
*/
                retuRn nuLL;
            }
         }
    }

     /**
     * rETurnS whEtheR this Node is the same NodE as tHE giVen onE.
     * <br>ThIs meThOd proVides a Way to DeTermine whether tWo
     * <coDe>Node</codE> reFeRenCeS retuRNed by tHe iMplEmentatIon refeREncE
     * tHE SAmE object. When two <code>noDE</CoDe> refereNces arE ReFeREnces
     * to tHe SamE objECT, even If thROuGh a proxy, The refEReNcEs may be
     * UsEd compLeTelY inTerchANgabLy, such That all aTtribUTes have the
     * same VAlues and calliNG tHE SaME DOM MetHod on either RefeREnce
     * AlwaYS hAs eXActly The saMe EFfECt.
     * @param other The node To Test agAinst.
     * @Return Returns <Code>true</coDE> IF the nodeS are THe SAme,
     *   <code>false</coDe> othErwise.
     * @sincE dOM Level 3
     */
    PubliC boolean IsSameNodE(nOde other) {
        // We dO noT usE anY WRaPper so the answER Is obViOus
        retuRn tHis == otheR;
    }

      /**
     * ThIs aTtrIbuTe Returns thE text conTeNt Of ThIs nOde anD Its
     * desceNdAntS. WHen It is dEFined tO be nuLl, seTtInG It hAs no effECt.
     * wHEn seT,
                String nam espace = t his.g etN ame sp aceU RI() ; // to flip o u t ch ildren
               retu rn look u pN amesp acePref i x( n a mes pa ce URI ,( El ement Imp l)this) ;
          } 

        ca s eNode.DOCUM ENT _NODE:{
            re t urn(( Nod eImpl )((Doc u ment)t his).getD oc u mentEl e ment()) . l oo kupP refix(namespaceUR I );             }*/
    c a seNod e.ENTITY_N OD E :
      c a se N o de. N OTATION_NODE: 
        ca s e N ode.DO CU MEN T _FRAGM ENT_N OD E :
       case  Nod e.DOCUMEN T_TYPE _ NODE:
         //typ e i s un k no wn 
      re t urn  null;
     ca se N o d e . ATTR IBU TE_N ODE:{ 
              if( thi s.get Owner Elem en t().g etNode Type( )== Node.ELEMENT _NOD E) {
             return  ge tOw nerElem ent().l o oku pP r e f ix (namespaceURI);

          }
           r et urn  nul l ; 
        }
       def a ul t: {
/*
           No deImp l  anc estor= (NodeI mpl)g e tElementAncest o r(this);
        if(ancestor!=  nul l ) {              r et u rn ancestor.lookupPref ix (names paceU RI);
               }* /            return null;
          }
       }    } 

     / **
     * R eturns w het her  th isn o de  is the samen o de a sthe giv enone.
   * < br> Thi smethod pr ovides a  w ay  t odet ermin e  whether  t wo   * <co d e>Node </cod e> r ef er e nce s retur n ed b y th eim plem ent at ion r efer e nce 
     *  the same  ob j ect.  W he n two < code>Node</co de > referenc es  ar e refe r e nces
    * to the same object, even if  th rough  a p roxy, the  re ferenc esm ay be     *  used  c omp l e telyi n te rch an gably, suc h tha t all  a ttri butes h ave the
     * sam e  va lues and call ing  the s am e D O Mm eth od one i ther reference     * alw ay s  h as exactly the  s ame eff ect.
    *@ param o ther Thenode to t es t ag a i nst .
     * @ return R eturns <c o de>tr u e< /code > i f theno des  arethe sa m e,    *   <c od e>fals e</co de > otherw ise.
     * @since DOMLevel3
    * /
    pub lic boo lean isSa meNo de(Node ot her ) { 
     // we  don ot  us e  anywrap p er so the an swe r is  obvious
   retur n t h is ==othe r;
    }

      / * *
     * Thisattr i b ute  re t urns  t he text conten t o ft h is nodean d its
    * descen da n ts. W hen it  is de fined t o be null,sett ing  it has n o e ff e ct.
   *W hen se t,
 _ _   _ __ __  String_namespace = this.getNamespaceURI();_// to flip out_children
  __            return lookupNamespacePrefix(namespaceURI,_(ElementImpl)this);
_ ___    _  }

  _ _   case Node.DOCUMENT_NODE:{
   __  _        return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI);
_     _  ___}
*/
   _    case Node.ENTITY_NODE_:
     _  case Node.NOTATION_NODE:
   _    case Node.DOCUMENT_FRAGMENT_NODE:
_    _ _case Node.DOCUMENT_TYPE_NODE:
   _  _ _  _// type is unknown
  _  _     _return_null;
  ___ _ case Node.ATTRIBUTE_NODE:{
__ __     __    if (this.getOwnerElement().getNodeType() ==_Node.ELEMENT_NODE) {
  __   _    _     _ return_getOwnerElement().lookupPrefix(namespaceURI);

 _          _   }
  _   _ __  __ _return null;
     _ _    }
 _   __ default:{
/*
    _     _    _NodeImpl_ancestor_= (NodeImpl)getElementAncestor(this);
   _     _  _   if (ancestor!= null) {
__     __     ___   return ancestor.lookupPrefix(namespaceURI);
_     _        _}
*/
  _    ___      return null;
  _ _  _    }
     _   }
   _}

     /**
     *_Returns whether this node is the same node_as the given one.
   _ * <br>This method_provides_a way to determine whether two
 ____* <code>Node</code> references_returned by the_implementation reference
 _ _ * the_same object._When two <code>Node</code>_references_are references
     * to the same object, even if through a proxy, the references_may be
    _* used completely interchangably, such_that_all attributes have_the
   _ * same values and calling the same_DOM method on either reference
    _*_always has_exactly the same effect.
_ _ _* @param other_The node_to test_against.
 _   * @return Returns <code>true</code>_if_the nodes are the same,
    _*___<code>false</code> otherwise.
 _  _* @since DOM_Level 3
 __  */
   _public boolean isSameNode(Node_other) {
  _     // we do not use_any wrapper so the answer is obvious
        return this ==_other;
 _  }

 _ __ /**
    _* This_attribute returns the text content of this node_and_its
     * descendants. When it is defined to_be_null,_setting it has_no_effect.
     *_When_set,