AnsweredAssumed Answered

escape xml tags

Question asked by gokceng on Mar 14, 2011
Hi,
My model has one aspect that has one property that holds xml.
So I have documents' which have xml property that's named 'my:documentData'.
It looks like that on document:

<docData>
   <someNumber>27625855044</someNumber>
</docData>

When I'm using Node Browser's search capability, with cmis-alfresco, it doesn't return any result when I used xml tags like <,> but it returns result without them.
For example;

SELECT D.*, O.* FROM cmis:document AS D JOIN my:Document AS O ON D.cmis:objectId = O.cmis:objectId WHERE O.my:documentData LIKE '%27625855044%'
returns correct result but

SELECT D.*, O.* FROM cmis:document AS D JOIN my:Document AS O ON D.cmis:objectId = O.cmis:objectId WHERE O.my:documentData LIKE '%<someNumber>27625855044</someNumber>%'
or

SELECT D.*, O.* FROM cmis:document AS D JOIN my:Document AS O ON D.cmis:objectId = O.cmis:objectId WHERE O.my:documentData LIKE '%&lt;someNumber&gt;27625855044&lt;/someNumber&gt;%'
doesn't.

How can I query this data?

Outcomes