I want to be able to transform the contents of an XML file into a coldfusion structure, with structure elements named by the XML node names.
XML structure:
<text>
<node1>Node1 data</node1>
<node2>Node2 data</node2>
</text>
Coldfusion structure required:
struct.node1="N ode1 data"
struct.node2="N ode2 data"
Currently, I can only do this by defining individual .xsl tranform files for each of the nodes. There must be a more efficient way of doing this. Perhaps with only one .xsl file that can read the node names and assign them to individual structure element names, before reading the values of each node.
Can anyone point me in the direction of an example or tutorial that can assist me in doing this.
Regards Blackmore
XML structure:
<text>
<node1>Node1 data</node1>
<node2>Node2 data</node2>
</text>
Coldfusion structure required:
struct.node1="N ode1 data"
struct.node2="N ode2 data"
Currently, I can only do this by defining individual .xsl tranform files for each of the nodes. There must be a more efficient way of doing this. Perhaps with only one .xsl file that can read the node names and assign them to individual structure element names, before reading the values of each node.
Can anyone point me in the direction of an example or tutorial that can assist me in doing this.
Regards Blackmore
Comment