I like to parse the value of asp.net, unfortunately, the asp classic also returns a tag, such as a tag <div>everything within it</div>.
I try to parse the path "/ root / div" and return everything to it, not including " <div></div>", the result should be " <p>abc <span>other span</span></p>"
<%
Set CurrentXML=Server.CreateObject("Microsoft.XMLDOM")
CurrentXML.LoadXml("<root><div><p>abc <span>other span</span></p></div></root>")'Load string into CurrentXML
Response.Write("<BR>"&Server.HTMLEncode(CurrentXML.SelectSingleNode("/root/div").XML)) 'I want to return without the div, the correct result should be <p>abc <span>other span</span></p>
%>
source
share