3

I have connected my oracle schema to solr. The tables and columns in my oracle schema were created with double-quotes(") and I am getting errors when using them below in the entity query portion of dataconfig.xml:

<entity name="itemsum" query="select * from Bug b where b."item" = 8 " > 

The error I am getting is:

Caused by: org.xml.sax.SAXParseException: Element type "entity" must be followed by either attribute specifications, ">" or "/>".

I know it is because of the double-quote but I cannot recreate my table and columns. Any ideas would be appreciated.

4

3 回答 3

0

您是否尝试使用 '\' 转义引号?

于 2013-01-28T21:31:54.993 回答
0

您可以使用单引号将 XML 中的属性值括起来:

<entity name="itemsum" query='select * from Bug b where b."item" = 8 ' > 

或者,您可以将引号字符转义为 "

于 2013-01-28T22:07:56.620 回答
0

尝试转义这些字符...您可以使用此页面查看如何转义 xml 中的字符 .. 这应该会有所帮助

于 2013-01-29T00:11:15.037 回答