Archived Forum Post

Index of archived forum posts

Question:

Xml replace value

Jan 20 '16 at 19:16

Hello I need some help please:

I have this xml <url> <loc>http://www.domain.com/index.asp?p=968D7BD6-07DD-4717-87E3-699A6C719029</loc> <lastmod>2015-12-28T18:07:30+00:00</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url>

i need a vbs example how to change the <lastmod> value

Best Regards


Answer

set xml = CreateObject("Chilkat_9_5_0.Xml")
xml.LoadXml(s)
xml.UpdateChildContent("lastmod","some new value")
strXml = xml.GetXml()