Dear All

I got "<Filter></Filter>"    (UNWANTED EMPTY FILTER) while using
DocumentWriter.writeFragment(), don't know whether it is a bug or
something I did wrong?

I got something as:
"
<Filter xmlns="http://www.opengis.net/ogc";
xmlns:gml="http://www.opengis.net/gml";><And><PropertyIsEqualTo><PropertyName>SEX</PropertyName>
<Literal>2</Literal>
</PropertyIsEqualTo>
<PropertyIsEqualTo><PropertyName>ISCOMMUNAL</PropertyName>
<Literal>-9</Literal>
</PropertyIsEqualTo>
<PropertyIsEqualTo><PropertyName>AGE0</PropertyName>
<Literal>0</Literal>
</PropertyIsEqualTo>
</And>
<Filter></Filter>    (UNWANTED EMPTY FILTER)
</Filter>
"
using DocumentWriter.writeFragment(
                            columnFilter,
SchemaFactory.getInstance(org.geotools.filter.v1_0.OGC.Filter.getNamespaceURI()),
                            printWriter,
                            OGCSchema.getInstance().getImplementationHints());

Besides, If I use Encoder..encode(columnFilter,
org.geotools.filter.v1_0.OGC.Filter, new BufferedOutputStream(new
FileOutputStream("C:/users/jianhui jin/work/temp.xml"))) instead, got
exception:
java.lang.NullPointerException
        at 
org.geotools.xml.impl.SchemaIndexImpl.destroy(SchemaIndexImpl.java:96)
        at org.geotools.xml.Encoder.encode(Encoder.java:1007)
        at org.geotools.xml.Encoder.encode(Encoder.java:557)


Any ideas?

TKS a lot

Jin

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to