0 Replies Latest reply on Feb 16, 2009 2:28 AM by Adobe-InDesign CS4

    Add Namespace in XPATH - Declaration - [JS]-CS4

    Adobe-InDesign CS4
      Dear All,

      Here I have a big doubt regarding for XPATH - Add Namespace in JavaScript.

      I have to written in Vb.NET

      //---------------- Add Namespace in VB.NET --------------------//
      Dim xDom As New XmlDocument
      Dim xNs As New XmlNamespaceManager(xDom.NameTable)
      xNs.AddNamespace("ce", "http://www.elsevier.com/xml/common/dtd")
      xNs.AddNamespace("aid", "http://adobe.com/4.0")
      AuthorNds = xDom.SelectNodes("//ce:author", xNs)

      and using the xNs in anywhere, But I can't declare the namespace in Javascript+XPATH.

      this.name = "AddReturns";
      //XPath will match on every XML element in the XML structure.
      this.xpath = "//ce:author";
      // Define the apply function.
      this.apply = function(myElement, myRuleProcessor)

      Only is there in the XPATHs. So How to use and insert the namespace in the Javascript + XPATH operations.

      Please kindly give me a suggestion to declare the XPATH in javascript....

      Thanks & Regards
      T.R.Harihara SudhaN