1 Reply Latest reply on Mar 29, 2010 6:49 AM by childsmile

    Remove tag using Xpath

    childsmile

      hi,

       

      I am trying by using XPath to remove or untag the element, but it suceeds shortly because it throws an error !!

      i used this code, but i can't overcome this error.

       

      var myRuleSet = new Array (new myStep3);                   
      var j = 0;
      var a=new Array();

      with(doc)

       

        {
              var elements = xmlElements;
              __processRuleSet(elements.item(0), myRuleSet);
        }
      function myStep3()
        {
           this.name = "myStep3";
           this.xpath = "//Para";
           this.apply = function(myElement, myRuleProcessor)
             {
                with(myElement)
                  {
                     try
                        {
                        
                                myElement.remove();
                            
                          
                        }
                      catch(e)
                        {

       

                           
                        }                              
                   }              
                     return false;
                  }    
        }