Simple XML Library for 3dsMax

27 votes
Version: 
1.2
Date Updated: 
06/01/2010
Author Name: 
David Mackenzie

Hi Everyone,

This is a library that simplifies working with XML files and XML Trees. It wraps the DotNet library's to provide a simpler way to work with XML. It has been kicking around the web on CgTalk and Tech Artists forum for quote a while so I thought I would post here.

It is implemented as to structs XMLDocument for working with XML files and XMLNode which represents a node in XML. It is very easy to use.

In the script at the bottom there is a complete example script documenting how to use it etc.

If you have any feedback or suggestions please let me know.

Cheers,
Dave

Version Requirement: 
Max 9+
AttachmentSize
XMLStruct.ms5.41 KB
XMLStruct_v1.2.ms5.3 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
br0t's picture

Hi Dave, thanks for sharing

Hi Dave, thanks for sharing that library, seems much more convenient than the builtin dotnet interface! I ran into a small issue using it though:

xmlfile = "..." 
doc = XmlDocument() 
doc.LoadXml xmlfile 
-- fail, doc is now undefined

This is due to inside LoadXml() a variable doc is set to something else. Since there is no local keyword, if the variable exists it is being overwritten. I would highly recommend to use local/global in scripts to prevent this. Just wanted you to be aware, cheers!

Never get low & slow & out of ideas

dandg's picture

I have updated the file to

I have updated the file to version 1.2 The new version fix a few bugs that where popping up.

Cheers,
Dave

David Mackenzie
Pipeline TD
http://daveandgoliath.com

dandg's picture

Yes it should! How did I miss

Yes it should! How did I miss that! Anyways I will upload an update very shortly. I have also added some changes to the getText() method.

Cheers,
Dave

David Mackenzie
Pipeline TD
http://daveandgoliath.com

fxcalibur's picture

Hey Dave!

Hey Dave!

I've been searching for something like this for a long time THX!! :)

Just one thing...
when I try to access "GetChild" I got an error

shouldn't the first line of the function be:
dNode = DotNetNode.ChildNodes.ItemOf index ?

it sais DotNetObject instead.

Greets
fxc

DOOM DOOOOM DOOOOOOOOOM!!!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.