Hi Marc Our XML Toolkit will help you with this:
http://torchbox.com/xml/toolkit.cfm You could use either the XMLQuery tag (which creates a ColdFusion query object from your XML document) or the XMLDatasource2struct (which creates a ColdFusion structure object). These tags are all open source, so feel free to poke around and use bits for your own projects. SOXML, from siteobjects.com, will also convert XML documents into CF structures. Both use the MSXML parser. Good luck Tom -----------------+ tom dyson t: +44 (0)1608 811870 m: +44 (0)7958 752657 http://torchbox.com > Greetings. > > Currently I'm using msxml to load/parse xml documents. I load the document and > then loop through it, setting variables like so: > > <cfset article-info = loopItem.SelectSingleNode(//title)> > > and the like. > > What I'd like to do, though, is to dynamically create these variables and > their content rather than coding them manually. > > so a loop would look something like this: > > For every node in the document > set <currentNodeName> = currentNodeContent > > So if the document had 30 nodes (including childnodes), I'd end up with 30 > variables named after the document's elements, and those variables would > contain that element's contents > > any ideas? -----------------------+ cf-xml mailing list list: [EMAIL PROTECTED] admin: [EMAIL PROTECTED] home: http://torchbox.com/xml
