ScriptSpot

Script

Simple XML Library for 3dsMax

By dandg · Credited author: David Mackenzie · 2010-01-18

Version
1.2
Version requirement
Max 9+
Date updated
2010-06-01
Votes
27
Description

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

Attachments

Tags: xml, Library, 3dsmax, simple, struct

Comments (4)

br0t · 2015-08-26

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!

dandg · 2010-06-01

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

Cheers,
Dave

dandg · 2010-05-08

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

fxcalibur · 2010-02-18

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