How can I create an xml object (or any object in fact) named after a variable,
i.e
variable called section with value “names”
create object [section value + “XML”] = new xml();
result: empty xml object called namesXML
How can I create an xml object (or any object in fact) named after a variable,
i.e
variable called section with value “names”
create object [section value + “XML”] = new xml();
result: empty xml object called namesXML
[AS]
section = “names”;
_root[section +“XML”]= new XML();
[/AS]
notice the ommission of the . after _root, that is not an accident. I think that is what you were asking for. (you almost had it correct in your question [section value + “XML”] = new xml(); :D)
Thanks!
you know, I tried to do it - but my version included the “.” after _root, which is why it didn’t work.
I was sure my logic was sound.
sometimes it’s the smallest thing that stops it from working.
Cheers!!
See http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12082 for more on the subject.
:: Copyright KIRUPA 2024 //--