on 05-21-2007 3:08 PM
Hi everybody,
does anybody know, what [1] means?
Thanks Regards Mario
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
[1] is the first index of MYELEMENT
it should also have an index [0].
<i>
[Reward if helpful]</i>
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this:
http://www.w3schools.com/xpath/xpath_examples.asp
<i>select the First book Node
The following example selects only the first book node under the bookstore element:
xmlDoc.selectNodes("/bookstore/book[0]")
If you have IE 5 or higher you can try it yourself
Note: IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]!!
A Workaround!
To solve the [0] and [1] problem in IE5+, you can set the SelectionLanguage to XPath.
The following example selects only the first book node under the bookstore element:
xmlDoc.setProperty "SelectionLanguage", "XPath"
xmlDoc.selectNodes("/bookstore/book[1]")</i>
Regards
Stefan
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.