Wrox Programmer Forums
|
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 13th, 2004, 07:01 AM
Authorized User
 
Join Date: Jun 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe
Default replace single child with value

have e.g. this xml
<sqlpart>AND (y.Goedkeurder = <var id="personeelslid_id"/> )</sqlpart>

at the end <var .../> has to be replaced by a value and xml must become this:
<sqlpart>AND (y.Goedkeurder = 250 )</sqlpart>

how to do ?

thx!
kristof
 
Old April 14th, 2004, 09:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

so you want to replace a node with just text? Try this:
Code:
    ' this is the text you want to put in place of the var node
    Dim xText
    Set xText = DomObject.createTextNode("250")

    ' this is the var node to be replaced
    Dim xTempNode
    Set xTempNode = DomObject.selectSingleNode("sqlpart/var[@id='personeelslid_id']")

    ' this is the replacement
    DomObject.documentElement.replaceChild xText, xTempNode





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening MDI Child on Button Click of MDI Child Sachin Shinde Visual Studio 2005 0 June 8th, 2006 05:05 AM
Replace crmpicco VB How-To 15 May 20th, 2005 01:34 PM
Single crmpicco Excel VBA 2 May 10th, 2005 03:57 AM
ASP.Net Single Single-on with Oracle Application S guhanath Oracle 0 October 6th, 2004 05:05 AM
replace single Quote qadeerahmad General .NET 3 September 6th, 2004 08:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.