Code example for Document

Methods: getDocumentElement, getElementsByTagName

0
//        return "/DEFAULT_LOGGING.properties"; 
//    } 
     
    public void testGetFeature10() throws Exception { 
        Document doc = getAsDOM("wfs?request=GetFeature&typename=cite:Geometryless&version=1.0.0&service=wfs");
        assertEquals("wfs:FeatureCollection", doc.getDocumentElement()
                .getNodeName());
//        print(doc); 
 
        NodeList featureMembers = doc.getElementsByTagName("gml:featureMember");
        assertFalse(featureMembers.getLength() == 0);
        NodeList features = doc.getElementsByTagName("cite:Geometryless");
        assertEquals(3, featureMembers.getLength());
    } 
     
    public void testGetFeatureReproject10() throws Exception { 
        WFSInfo wfs = getWFS();
        wfs.setFeatureBounding( true );
        getGeoServer().save( wfs );
         
        Document doc = getAsDOM("wfs?request=GetFeature&typename=cite:Geometryless&version=1.0.0&service=wfs&srsName=EPSG:900913");