Replace XML Node value with another Classic ASP, VB script

Exannydolla

New Member
I have the following XML that need to parsed using ASP VBscript,\[code\]<ERROR> <ITEM> <CODE>X11</CODE> <TEXT>E112</TEXT> </ITEM> <ITEM> <CODE>X14</CODE> <TEXT>E888</TEXT> </ITEM> <OTHER-INFO> <XID>I989</XID> <OTHER-INFO> <ERROR>\[/code\]My requiremnt is to replace TEXT value inside ITEM with its corresponding detailed information that i will get it from getInfo(code) function. How to replace TEXT value using classic asp and vbscript.output required,\[code\]<ITEM> <CODE>X11</CODE> <TEXT>Detailed Explanation about this error</CODE></ITEM>\[/code\]I have written the following code to iterate through each ITEM.objMSXML contains the above tags and i need the results back in the same object.\[code\]If objMSXML.getElementsByTagName("ERROR").length <> 0 Then For Each ObjNode In objMSXML.documentElement.selectNodes("ITEM") strTrasMsg = getInfo(objECGO.xVal("CODE",ObjNode,"STR")) NextEnd If \[/code\]Please help.Regards,Wilson.
 
Back
Top