开发者

xmldoc.selectNodes() is not working properly

I have the following XML:

<resultset morerecords="0" paging-cookie="&lt;cookie page=&quot;1&quot;&gt;&lt;activityid last=&quot;{2FCC78E0-EC60-E011-9854-000C291F081D}&quot; first=&quot;{2FCC78E0-EC60-E011-9854-000C291F081D}&quot; /&gt;&lt;/cookie&g开发者_JS百科t;">
    <result>
        <activityid>{2FCC78E0-EC60-E011-9854-000C291F081D}</activityid>
    </result>
</resultset>

And I am trying to get each activityid tag from the xml using xmldoc.selectNodes("//activityid") however, I am not getting the expected result.

The error I am getting is 'Wrong number of arguments or invalid property assignment'.

My XPath is correct and also the javascript seems correct. What could be wrong?

EDIT:

Accessing it with the random access operator([]) works but for (... in ...) doesn't.

Why is that?


It appears that if '&' is present then 'selectNodes' function does not select any row.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜