Using an xml based filter with openlayers
===

I am fairly new to OpenLayers and Geoserver.
I am trying to display a layer on a map using openlayers and apply a filter to it using WFS request.
The request works fine and and simple filter also works.

This one:

    				var filString = '<Filter>'+
									'<PropertyIsEqualTo>'+
										'<PropertyName>AREA</PropertyName>'+
										'<Literal>1064866676</Literal>'+
									'</PropertyIsEqualTo>'+
								'</Filter>';

I convert that xml string into an OGC filter using this:

    var my_filter_xml, parser, xml;

    parser = new OpenLayers.Format.Filter.v1_1_0 ();
    xml = new OpenLayers.Format.XML();
    my_filter_xml = filterXML; //your filter string

    var x = xml.read(my_filter_xml).documentElement
    var filter1 = parser.read(x);

When I try to convert this to an OGC filter, it returns "undefined".

This one:

    				filterXML = '<Filter>'+
								'<Crosses>'+
									'<PropertyName>the_geom</PropertyName>'+
									'<Function name="collectGeometries">'+
										'<Function name="queryCollection">'+
											'<Literal>tasmania_water_bodies</Literal>'+
											'<Literal>the_geom</Literal>'+
											'<Literal>AREA = 1064866676</Literal>'+
										'</Function>'+
									'</Function>'+
								'</Crosses>'+
							'</Filter>';

Does anyone know why this is happening? or is there another way I can apply this filter with a WMS request rather thatn converting that xml.

NOTE: This I how is use the generated filter:

    				wfsProtocol = new OpenLayers.Protocol.WFS({
								url: "http://localhost:8080/geoserver/wfs",
								featureType: ["tasmania_water_bodies"],
								featureNS: "http://www.openplans.org/topp",
								filter: filter1
							});