snowmantle
Programmer
Hi,
Could anyone please point me in the right direction for what method is used for creating an xml document?
I have a two dimensional array which has 1 column holding a variable name and the other column holds the value of the variable.
Using the below code displays the firstname value in a message box, eg. dataArray(0,0) = "firstname" and dataArray(0,1) = "bob".
I am trying to get that into xml so it would be,
<details>
<firstname>Bob</firstname>
...
</details>
I think the method might be .xml but im not sure how to use it properly.
I have only ever used response.write in .asp
Could anyone please point me in the right direction for what method is used for creating an xml document?
I have a two dimensional array which has 1 column holding a variable name and the other column holds the value of the variable.
Using the below code displays the firstname value in a message box, eg. dataArray(0,0) = "firstname" and dataArray(0,1) = "bob".
I am trying to get that into xml so it would be,
<details>
<firstname>Bob</firstname>
...
</details>
I think the method might be .xml but im not sure how to use it properly.
I have only ever used response.write in .asp
Code:
Dim objXml, objDetails
Set objXml = CreateObject("Microsoft.XMLDOM") 'create an instance of the DOM Document class
Set objXml.documentElement = objXml.createElement("details")
Set objDetails = objXML.createElement("detailsitem")
objDetails.appendChild objXml.createElement("firstname")
objDetails.childNodes(0).text = dataArray(0,1)
msgbox(objDetails.childNodes(0).text)