You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by David Xiao <da...@gmail.com> on 2007/04/20 16:06:43 UTC

Update with fancy characters in xml

I am updating text into solr, use post.sh. I found that if the .xml contains fancy words such as “<>” it will actually corrupt xml schema layout. 

 

For example, 

 

<field name=”features”> some text…here and there, and text contains a xml tag: <field> this will corrupt </field>

 

Is that way to avoid this corruption? Thanks.

 


Re: Update with fancy characters in xml

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 4/20/07, David Xiao <da...@gmail.com> wrote:
> I am updating text into solr, use post.sh. I found that if the .xml contains fancy
> words such as "<>" it will actually corrupt xml schema layout.

As the document to be posted is XML, it must be well-formed, so you
must escape some characters ( < > and & ) in it, according to
http://www.w3.org/TR/REC-xml/

-Bertrand