Hi,
my xml file is
<?xml version="1.0"?>
<BOOK ID="BOOK">
<METADATA>
<BOOKTITLE>Glencoe Mathematics Applications and Concepts Part 1</BOOKTITLE>
</METADATA>
<BOOKSUBTITLE>Student Edition</BOOKSUBTITLE>
<ISBN>0078600596</ISBN>
<PUBLISHER/>
<SUBJECT/>
<AUTHOR/>
<GRADE/>
</BOOK>
and I want to insert a new element into this using the following code
<%
set xmlDoc = server.CreateObject("Msxml2.DOMDocument")
xmlDoc.Load(Server.Mappath("insertChild.xml"))
set root = xmlDoc.documentElement
set newElem = xmlDoc.createElement("ANUNAY")
set newNode = xmlDoc.createNode("element","ASHISH","")
Response.write newElem.nodeName + " " + newNode.nodeName + "<br>"
Set refElem = root.childNodes.item(6)
root.insertBefore newElem, refElem
Response.write refElem.nodeName
%>
but I am not able to though no error is thrown. Please suggest me the remedy.