![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Problem with an XPATH statement in JScript >Thread Next - Re: Problem with an XPATH statement in JScript Re: Problem with an XPATH statement in JScriptTo: NULL Date: 7/6/2006 7:54:00 PM
Michael D. wrote:
> I'm trying to select a node by it's position number in a JScript statement.
> However, the below line gives me an error:
>
> myInfoNode2 = xmlCourse.selectSingleNode("position()=3");
I think you want
xmlCourse.selectSingleNode("node()[position()=3]")
or simply
xmlCourse.selectSingleNode("node()[3]")
Depening on what kind of node xmlCourse is you also want to look for
descendants and not only children e.g.
xmlCourse.selectSingleNode(".//node()[3]")
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
