Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to isert CDATA text into a xml using xslt
    text
    copied!<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/14215573/trying-to-insert-cdata-section-into-a-xml">trying to insert CDATA section into a xml</a> </p> </blockquote> <p>I am trying to isert into a xml but getting below error XSLT Error (javax.xml.transform.TransformerException): XML document structures must start and end within the same entity. Exception in thread "main" java.lang.RuntimeException: XML document structures must start and end within the same entity.</p> <p>input xml</p> <pre><code> &lt;Create&gt; &lt;requestXml&gt; &lt;ISD_XMLGateway&gt; &lt;Entity&gt;HLR_ALC&lt;/Entity&gt; &lt;Origin&gt;Comverse One&lt;/Origin&gt; &lt;Log_Level&gt;0&lt;/Log_Level&gt; &lt;Params&gt; &lt;Param Name="HLR_System" Value="JT"/&gt; &lt;Param Name="HLR_ALC_Command" Value="Send_HLR_Command"/&gt; &lt;Param Name="HLR_Command" Value="CRESBX:MSIN=Start43515213,MODEL=MODEL002,SNBSV=7797098765-TEL;"/&gt; &lt;/Params&gt; &lt;/ISD_XMLGateway&gt; &lt;/requestXml&gt; &lt;/Create&gt; </code></pre> <p>Output what i am expecting is</p> <pre><code> &lt;Create&gt; &lt;requestXml&gt;&lt;![CDATA[ &lt;ISD_XMLGateway&gt; &lt;Entity&gt;HLR_ALC&lt;/Entity&gt; &lt;Origin&gt;Comverse One&lt;/Origin&gt; &lt;Log_Level&gt;0&lt;/Log_Level&gt; &lt;Params&gt; &lt;Param Name="HLR_System" Value="JT"/&gt; &lt;Param Name="HLR_ALC_Command" Value="Send_HLR_Command"/&gt; &lt;Param Name="HLR_Command" Value="CRESBX:MSIN=Start43515213,MODEL=MODEL002,SNBSV=7797098765-TEL;"/&gt; &lt;/Params&gt; &lt;/ISD_XMLGateway&gt;]]&gt; &lt;/requestXml&gt; &lt;/Create&gt; </code></pre> <p>in the XSL i have added the two text nodes after requestXml nodeas below <code>&lt;xsl:text disable-output-escaping="yes"&gt;&amp;lt;![CDATA[&lt;/xsl:text&gt; &lt;xsl:text disable-output-escaping="yes"&gt;]]&amp;gt;&lt;/xsl:text&gt;</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload