Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XMl Dom - update [Thread Next] Re: XMl Dom - updateTo: NULL Date: 9/17/2007 5:57:00 PM
Steve D wrote:
> I would like to know if it is better (fatser?) to update an xml with many
> line like below?
> Session("SessionData").selectSingleNode("/zzz[@id='xx']").attributes.getNamedItem("lname").text = xxx
> Session("SessionData").selectSingleNode("/zzz[@id='xx']").attributes.getNamedItem("fname").text = xxx
> etc...
> or to create a new temp xml create the hole update we need to do an then
> update once the main xml (in this example Session("SessionData")) ?
It should be faster to store the result of
Session("SessionData").selectSingleNode("/zzz[@id='xx']")
in a variable e.g.
Set element = _
Session("SessionData").selectSingleNode("/zzz[@id='xx']")
and then use e.g.
element.setAttribute("lname", "...")
element.setAttribute("fname", "...")
...
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
