rajesh_makiredd
11 years agoOccasional Contributor
XML object initialization
Hi,
I have written the script to initialize the xml object. Please look into the code once.
Function webservice(tag)
set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("D:\webservice\test.xml")
Application = xmlDoc.GetElementsByTagName(tag).item(0).text()
' Set Application = xmlDoc.DocumentElement
' set a= Application.SelectNodes(tag)
' Log.message a
TagValue= application
Log.Message("tag value is" &tagvalue)
end function
But while executing the above script getting VB script error.
Error is:-
Object required: 'xmlDoc.GetElementsByTagName(...).item(...)'
Unit: "Unit1" Line: 12 Column: 5.
Please suggest me..
Thanks in advance..
I have written the script to initialize the xml object. Please look into the code once.
Function webservice(tag)
set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("D:\webservice\test.xml")
Application = xmlDoc.GetElementsByTagName(tag).item(0).text()
' Set Application = xmlDoc.DocumentElement
' set a= Application.SelectNodes(tag)
' Log.message a
TagValue= application
Log.Message("tag value is" &tagvalue)
end function
But while executing the above script getting VB script error.
Error is:-
Object required: 'xmlDoc.GetElementsByTagName(...).item(...)'
Unit: "Unit1" Line: 12 Column: 5.
Please suggest me..
Thanks in advance..