DotNet XML in MaxScript

DotNet XML in MaxScript

Anonymous
Not applicable
633 Views
2 Replies
Message 1 of 3

DotNet XML in MaxScript

Anonymous
Not applicable
Hello all,

I'm writing a little script that uses the DotNet XMLDocument object.

Previously,
I used to make extensive use of the msXML ActiveX control through MaxScript.

The sintax would usually be:

TheReleventXMLNode = TheXMLObject.firstChild.childNodes.childNodes


That makes an error in the DotNet XML,
Where I can only use:

TheReleventXMLNode = (TheXMLObject.firstChild.childNodes.itemOf 0).childNodes.itemOf 2


It's not terrible writing it that way,
But I would prefer using the more convinient and strait indexing method,
What's weird is that firstChild, lastChild, do work, but childNodes dont.


Thanks for any reply


Oded
0 Likes
634 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
You can use item instead of itemOf x, but I don't think the additional level of abstraction can be avoided.

Note that item is not a MAXScript array; it is zero-based rather than one-based. The first child is item, not item.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks stokes,

Much nicer,
Solved my problem.


Cheers,

Oded
0 Likes