tamaramata / solrnet

Automatically exported from code.google.com/p/solrnet
0 stars 0 forks source link

SolrDocumentSerializer does not serialize XML content properly #118

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add document with field containing XML data

What is the expected output? What do you see instead?
The expected output is a field value which contains a CDATA section containing 
valid XML (e.g. <![CDATA[<myroot><mychild/></myroot>]]>. Instead it encodes the 
XML and Solr throws a "com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected 
character 'C' (code 67) (CDATA not allowed in prolog/epilog)" exception.

Original issue reported on code.google.com by onno.cee...@gmail.com on 27 Aug 2010 at 10:21

GoogleCodeExporter commented 8 years ago
Can you create a failing test for this? Note that there's already a test for 
this (and it passes, of course): 
http://github.com/mausch/SolrNet/blob/master/SolrNet.Tests/SolrDocumentSerialize
rTests.cs#L51

Original comment by mauricio...@gmail.com on 28 Aug 2010 at 1:59

GoogleCodeExporter commented 8 years ago
Hi, continued to do some testing and rebuild my index. After that I was no 
longer able to reproduce. Alsobfound that it should be fine ro transmit encoded 
XML.

Original comment by onno.cee...@gmail.com on 31 Aug 2010 at 5:37

GoogleCodeExporter commented 8 years ago

Original comment by mauricio...@gmail.com on 31 Aug 2010 at 12:24