It seems this is done in XML(Response)Writer:

XML.escapeAttributeValue(stylesheet, writer);

I suppose this is valid according with XML escaping rules, but it's just a thought of mine because I don't know so strictly those rules. I see the < character is being escaped so what you get is coheren (I mean, I think it's not a mistake)

Did you try with another response writer (e.g. JSON)?

On 04/21/2015 03:46 PM, mesenthil1 wrote:
We are using DIH for indexing XML files. As part of the xml we have xml
enclosed with CDATA. It is getting indexed but in response the CDATA content
is coming as decoded terms instead of symbols. Example:

/Feed file:
/
<add>
   <doc>
         <field name="id">123</field>
         <field name="description_t">abc pqr xyz</field>
      *   <field
name="images_t"><![CDATA[<Images><image><uri>/images/series/chiunks/flipbooksflipbook30_640x480.jpg</uri></image></Images>]]</field></b>
    </doc>
</add>

XML response:(curl and browser view source)
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result name="response" numFound="1" start="0">
   <doc>
     <str name="id">123</str>
     <str name="description_t">abc pqr xyz</str>
<b>    <str name="images_t">&lt;Images&gt;
                      &lt;image&gt;
&lt;uri&gt;/images/series/chiunks/flipbooksflipbook30_640x480.jpg&lt;/uri&gt;
                                  &lt;/image&gt;
                               &lt;/Images&gt;
      </str></b>
    </doc>
</result>
</response>

Instead, we are looking to get the response as well within CDATA as below
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result name="response" numFound="1" start="0">
   <doc>
     <str name="id">123</str>
     <str name="description_t">abc pqr xyz</str>
<b>    <str
name="images_t"><![CDATA[<Images><image><uri>/images/series/chiunks/flipbooksflipbook30_640x480.jpg</uri></image></Images>
]]</b>
      </str>
    </doc>
</result>
</response>

Can anyone please help me if this is possible?

Thanks,
Senthil








--
View this message in context: 
http://lucene.472066.n3.nabble.com/CDATA-response-is-coming-with-lt-instead-of-tp4201271.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to