Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7858269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:21:33+00:00 2026-06-02T21:21:33+00:00

I like to be able to parsing the value like asp.net, unfortunately the asp

  • 0

I like to be able to parsing the value like asp.net, unfortunately the asp classic also return the tag like the <div>everything within it</div> tag.

I am trying to parse the path “/root/div” and return everything within it, not including the “<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>
 %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:21:35+00:00Added an answer on June 2, 2026 at 9:21 pm

    Try this:

    <%
    Option Explicit
    
        Dim xml: Set xml = Server.CreateObject("MSXML2.DOMDocument.3.0") 
        xml.LoadXml("<root><div>Text Start<p>abc <span>other span</span></p></div></root>")
    
        Dim sResult: sResult = ""
    
        Dim node
        For Each node in xml.selectSingleNode("/root/div").childNodes
            sResult = sResult & node.xml
        Next
    
        Response.Write Server.HTMLEncode(sResult) 
    
    %>
    

    Unfortunately the MSXML DOM elements do not have an innerXml property. Hence you need to the loop as exemplified about to concatenate the xml of each child node to genereate the inner XML of an element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I'm coming from C#-land, so I'm looking for something like being able to
I want some of the goodies in a ListView, like being able to use
Would like to be able to set colors of headings and such, different font
Id like to be able to create checkboxes for a list of objects. Then
I'd like to be able to fix the position of certain rows in a
I would like to be able to output the name of a variable, along
I'd like to be able to add an extension method like this: IObservable<T> AfterSubscriber(this
I'd like to be able to programmatically save an image from a page to
I would like to be able to print in the logs a message for
I'd like to be able to tell between two Grit::Commit objects, which is newer.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.