Hi,
On 22.02.2010 03:49, Sam-1234 wrote:
Hi All-
I am running into an interesting issue.
Please take a look at below xml(search.xml),after marshalling I need to
produce it.
As I understand, I can use the same xml to get schema and generate classes
from there and use in marshalling.
That is not true. With castor, you have several options when it comes to
marshalling 8XML data binding in general).
a) Use introspection (no mapping, no descriptor classes).
b) Use a mapping file (mapping supplied by you).
c) Use (generated) descriptor classes (as generated from an XML schema
or a set thereof).
In addition, it is (somewhat) possible to mix between those approaches.
Somehow I am not getting Criteria Object generated,as I guess code generator
is not able to distinguish
top level 'CriteriaExpression" Node and the one which has Criteria Node in
it?and it is affecting mapping file too.
I am not sure I understand how the code generator is relevant in your
statement. Is your starting point an XML schema ?
search.xml
<?xml version="1.0" encoding="UTF-8"?>
<CriteriaExpression>
<CriteriaOperator tc="2">AND</CriteriaOperator>
<CriteriaExpression>
<Criteria>
<ObjectType tc="115"/>
<PropertyName>FirstName</PropertyName>
<PropertyValue>Joe</PropertyValue>
<Operation tc="7"/>
</Criteria>
</CriteriaExpression>
<CriteriaExpression>
<Criteria>
<ObjectType tc="115"/>
<PropertyName>LastName</PropertyName>
<PropertyValue>Johnson</PropertyValue>
<Operation tc="1"/>
</Criteria>
</CriteriaExpression>
<CriteriaOperator tc="1">OR</CriteriaOperator>
<CriteriaExpression>
<Criteria>
<ObjectType tc="116"/>
<PropertyName>Zip</PropertyName>
<PropertyValue>123345</PropertyValue>
<Operation tc="2"/>
</Criteria>
</CriteriaExpression>
</CriteriaExpression>
I tries some variations/twick in schema but still not able to get the
desired result.
Please advice.
Thanks,
~Sam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email