2 Replies Latest reply on Jul 12, 2018 11:17 PM by johnp45247251

    [ESTK] new xml(string) - get error

    johnp45247251 Level 1

      Hi all,

       

       

      When I am using the below code, It will produce the output.

           //Working

           var myXML = new XML("<tags><tag type=\"a\">name</tag></tags>");

           var typeATags = myXML.xpath("//tag[@type]").attributes();

       

      While, Change the code with namespace. The below code is get an error.

           //Not working

           var myXML = new XML("<oasis:tags><oasis:tag type=\"a\">name</oasis:tag></oasis:tags>");     //Error at this line

           var typeATags = myXML.xpath("//oasis:tag[@type]").attributes();

       

       

      Please give any helps!!

       

      thanks,

      John.