<%
Set xmlDoc = Server.CreateObject("MSXML2.DOMDOCUMENT")
xmlDoc.loadXML( "<response />" )
Set node = xmlDoc.createElement("account")
xmlDoc.documentElement.AppendChild node
Set node = xmlDoc.createElement("type")
node.Text = "TheType"
xmlDoc.documentElement.AppendChild node
Set node = Nothing
%>
This creates an XML doc that looks like the following:
<response>
<account></account>
<type>TheType</type>
</response>
How do I append the "type" node as a child node to the "newaccount" node so that it looks like this:
<response>
<account>
<type>TheType</type>
</account>
</response>
Same way you're appending it to the document element now: