cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign content of XML to a string in bls

Former Member
0 Kudos

Hi Experts..

Can someone tell , how to take the content of the XML file thats created in the BLS into a string.

Regards

Sreekanth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When i try to assign the XML output to the string it is showing something like Invalid assignment target.. (as it is assigning a file to a string ) wat exactly to be done to get the entire XML content to a string on runtime.

the String should contain the value something like this

outputstring="<b><?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-10-16T13:38:29" EndDate="2007-10-16T13:38:29" StartDate="2007-10-16T12:38:29" Version="11.5.3"><Messages><Message>Command Query Successful</Message></Messages></Rowsets></b>"

Former Member
0 Kudos

This should not b prob.

Step 1: U hv an XML content to be shown as output. fine

Step 2: To show the XML content as a string, do define a Transaction Output Parameter with DataType of String from Transaction Properties.

Step 3: Use Assignment Action map the XML content (XML.Output) to that defined Transaction Output Parameter using <b>Assign Value</b> in the Link Editor

Step 4: Check this output parameter with Query Template Editor using Xacute Type.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Som...

I got it ... actaully i was trying to link string directly from xml file than assigning with the action block... and now the content is assigned to the string...

Former Member
0 Kudos

Simply define a variable in Local Properties with DataType of String, then map the XML Content to that defined String Variable using Assignment Action