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

  • Home
  • SEARCH
  • 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 596717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:12:06+00:00 2026-05-13T16:12:06+00:00

I am back to asp with XML manupulation. Initial file: <?xml version=1.0 ?> <root>

  • 0

I am back to asp with XML manupulation.
Initial file:

<?xml version="1.0" ?>
<root>
  <sport/>
</root>

this is my function

Public Function DefinitFunction( x,z)


Dim text 
Dim Root
Dim NodeList

    text = "<Definition>" ---<x> </x> <z> </z> --</Definition> " 
    text = text & "<x><![CDATA["&x&"]]> </x>"
    text = text & "<z> </z>"        
    text = text & "</Definition>"

Set Root = objDoc.documentElement 
Set NodeList = Root.getElementsByTagName("sport") 

NodeList.appendChild text 

objDoc.Save strFile

end function
'  Private strFile, objDoc are class object

I want to modify the all thing dynamically. So I have a function :
DefinitFunction(x,z) that will concatenate a string and append <Definition> ---<x> </x> <z> </z> --</Definition> in my file right after the Node <sport>
at the end this should be my result:

<?xml version="1.0" ?>
<root>
  <sport>
    <Definition>
        ---<x> </x> <z> </z> --
      </Definition> 
   </sport>
</root>

This is not working. Is there any better way of accomplishing this?

  • 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-05-13T16:12:07+00:00Added an answer on May 13, 2026 at 4:12 pm

    You cannot append text directly .. you need to convert it to XML node first..

    Set newXML = CreateObject("Microsoft.XMLDOM") 
    newXML.async = False 
    newXML.loadXML( "<root>" & text & "</root>")
    
    NodeList.appendChild( newXML.documentElement.selectSingleNode("/Definition"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on creating a call back function for an ASP.NET cache item removal
Back in the scripted ASP and ColdFusion days, I used to work on projects
I have a few ASP.Net database front-end websites where MS Access is the back-end.
I have a button on an ASP.Net page that will call Response.Redirect back to
Back in the old days, Help was not trivial but possible: generate some funky
Back in VB6, I wrote a few functions that would let me code without
Back in the days of Unix, you couldn't even close a software without reading
Back in the 90s when I first started out with MFC I used to
Back in 2000 (when .NET was unleashed upon us IIRC) it was an innovative
Back in college, only the use of pseudo code was evangelized more than OOP

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.