title: converting xsl param which has String to xml node in order to lopp through various nodes
body: <p>I have a scenario , where I will pass a parameter to XSLT which is in turn an xml element . But it will be sent as a escape charecters (&lt; for &lt; ....)</p>
  
  <p>My requirement is i have various childnodes in it where I have to loop through them and need to transform . Please find the request , parameter.</p>
  
  <p>Request.xml</p>
  
  <pre><code>     &lt;retrievePaymentMethodsRequest&gt;
          &lt;!--Optional:--&gt;
          &lt;retrievePaymentMethodsRequestTO&gt;
      &lt;financialAccountID&gt;3&lt;/financialAccountID&gt;
             &lt;bankCountryCode&gt;1&lt;/bankCountryCode&gt;
             &lt;clientID&gt;12345&lt;/clientID&gt;
             &lt;!--Optional:--&gt;
             &lt;device&gt;003&lt;/device&gt;
             &lt;excludedLifeIndicator&gt;003&lt;/excludedLifeIndicator&gt;
  
             &lt;financialAccountStatus&gt;3&lt;/financialAccountStatus&gt;
             &lt;kindCode&gt;003&lt;/kindCode&gt;
             &lt;notEndedIndicator&gt;0&lt;/notEndedIndicator&gt;
             &lt;!--Optional:--&gt;
             &lt;requestMode&gt;003&lt;/requestMode&gt;
             &lt;stateCode&gt;003&lt;/stateCode&gt;
          &lt;/retrievePaymentMethodsRequestTO&gt;
       &lt;/retrievePaymentMethodsRequest&gt;
  </code></pre>
  
  <p>parameter to xslt:</p>
  
  <pre><code>&lt;b xmlns:fs2="somescheama" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fga="anyvalue"&gt; xmlns:fs2="any value" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="any location "&amp;gt;
                            &amp;lt;statusCode&amp;gt;0&amp;lt;/statusCode&amp;gt;
                            &amp;lt;errorMessage&amp;gt;errorMessage&amp;lt;/errorMessage&amp;gt;
                            &amp;lt;paymentMethodTypes&amp;gt;
                              &amp;lt;!-- NULL or any type code  01, 04 , 10 (sample not real) --&amp;gt;
                              &amp;lt;methodTypeCode&amp;gt;01&amp;lt;/methodTypeCode&amp;gt;
                              &amp;lt;!-- Possible values methodTypeDisplayName 
                                  CREDIT_CARD,BANK_ACCOUNT,CASH,CHECK,CASH_EQUIVALENT
                               --&amp;gt;
                              &amp;lt;methodTypeDisplayName&amp;gt;CREDIT_CARD&amp;lt;/methodTypeDisplayName&amp;gt;
                              &amp;lt;!-- valid dollar amount --&amp;gt;
                              &amp;lt;maximumAmountPaid&amp;gt;100.00&amp;lt;/maximumAmountPaid&amp;gt;
                            &amp;lt;/paymentMethodTypes&amp;gt;
                            &amp;lt;paymentFormInfo&amp;gt;
                              &amp;lt;!-- NULL or any type code  01, 04 , 10 (sample not real) --&amp;gt;
                              &amp;lt;paymentMethodTypeCode&amp;gt;01&amp;lt;/paymentMethodTypeCode&amp;gt;
                              &amp;lt;!-- sample form id 1004854 , 1004874 , 1004889 , 1004875--&amp;gt;
                              &amp;lt;formId&amp;gt;1004885&amp;lt;/formId&amp;gt;
                              &amp;lt;!-- Not exactly sure just an assumption --&amp;gt;
                              &amp;lt;formLanguageRefId&amp;gt;US&amp;lt;/formLanguageRefId&amp;gt;
                              &amp;lt;!-- forn name : EFT_AUTHORIZATION --&amp;gt;
                              &amp;lt;formName&amp;gt;EFT_AUTHORIZATION&amp;lt;/formName&amp;gt;
                              &amp;lt;roleActivity&amp;gt;
                                &amp;lt;agentActivity&amp;gt;
                                  &amp;lt;inOfficeRulesForActivity&amp;gt;
                                    &amp;lt;!-- for Agent : REVIEW_PRINT, ESIGN , UPLOAD 
                                         for customer : CHECKBOX --&amp;gt;
                                    &amp;lt;customerActivity&amp;gt;REVIEW_PRINT&amp;lt;/customerActivity&amp;gt;
                                    &amp;lt;customerRole&amp;gt;PAYOR&amp;lt;/customerRole&amp;gt;
                                  &amp;lt;/inOfficeRulesForActivity&amp;gt;
                                  &amp;lt;outOfOfficeRulesForActivity&amp;gt;
                                    &amp;lt;customerActivity&amp;gt;CHECKBOX&amp;lt;/customerActivity&amp;gt;
                                    &amp;lt;customerRole&amp;gt;PAYOR&amp;lt;/customerRole&amp;gt;
                                  &amp;lt;/outOfOfficeRulesForActivity&amp;gt;
                                &amp;lt;/agentActivity&amp;gt;
                                &amp;lt;commonActivity&amp;gt;
                                  &amp;lt;roleCategory&amp;gt;ONLINE&amp;lt;/roleCategory&amp;gt;
                                  &amp;lt;roleForActivity&amp;gt;
                                    &amp;lt;customerActivity&amp;gt;ESIGN&amp;lt;/customerActivity&amp;gt;
                                    &amp;lt;customerRole&amp;gt;PAYOR&amp;lt;/customerRole&amp;gt;
                                  &amp;lt;/roleForActivity&amp;gt;
                                &amp;lt;/commonActivity&amp;gt;
                              &amp;lt;/roleActivity&amp;gt;
                            &amp;lt;/paymentFormInfo&amp;gt;
                            &amp;lt;financialAccountOwnerActivity&amp;gt;
                              &amp;lt;canChange&amp;gt;true&amp;lt;/canChange&amp;gt;
                              &amp;lt;!-- valid String --&amp;gt;
                              &amp;lt;searchOptions&amp;gt;searchOptions&amp;lt;/searchOptions&amp;gt;
                            &amp;lt;/financialAccountOwnerActivity&amp;gt;
                            &amp;lt;canChooseAgent&amp;gt;true&amp;lt;/canChooseAgent&amp;gt;
                          &lt;/b&gt;
  </code></pre>
  
  <p>Question:
  Here most of the complex elements are zero or more . I need to loop through all the elements . But if we have parameter as shown above it is difficult .we cannot implement for-each or any other valid xpath evaluation because in parameter we have xs:String . Is there a way looping through each elements (or) any valid xpath evaluation among xsl:param (or)xsl:copy </p>
  
  <p>Any help appreciated</p>
  
  <p>Thanks
  Eresh </p>