Article View: adobe.scripting.indesign
Article #1237Add Namespace in XPATH - Declaration - [JS]-CS4
From: rhariharasudhan05
Date: Mon, 16 Feb 2009 10:28
Date: Mon, 16 Feb 2009 10:28
28 lines
1601 bytes
1601 bytes
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)
//--------End
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
Technical Details
Message-ID:
<59b7f075.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,69110308d98b6f8e,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: rhariharasudhan05@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Add Namespace in XPATH - Declaration - [JS]-CS4 Message-ID: <59b7f075.-1@webcrossing.la2eafNXanI> Date: Mon, 16 Feb 2009 02:28:44 -0800 Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit