Inserting Value in XML - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Inserting Value in XML (/Thread-Inserting-Value-in-XML) |
Inserting Value in XML - newinqtp - 10-28-2010 Hi I am trying to insert multiple line in the XML using for loop. When I execute I am getting syntax error after Next stmt. Code: Input_request = "<soapenv:Envelope xmlns:soapenv="&chr(34)&">"_ Can anyone tell me what is wrong. RE: Inserting Value in XML - cdesserich - 11-01-2010 A couple of things are wrong here. First, Writeline is a function of the Scripting.FileSystemObject so you can't just call that function without its associated object. To concatenate strings to a variable in VBScript, you simply have to say var = var & "more string". Also, to get quotes in VBScript you simply have to type two together. If you are trying to get soapenv="" in your output, you have to double the quotes in the string constant "soapenv="""">". Seems silly, but that's how it works. Code: Dim rackNm, Input_request If you are wanting to add the new line character to make the formatting look decent, then you might try something like this: Code: Dim rackNm, Input_request Kind of messy, but it does the job. |