Code example for Document

Methods: getElementsByTagName

0
        SLDClassifier classifier = new SLDClassifier(EMPTY_MAP, command);
         
        Document doc = createDomDocument(classifier.getSLD());
 
        // need as many rules, filters and symbolizers as classes 
        assertEquals(classCount, doc.getElementsByTagName("sld:Rule").getLength());
        assertEquals(classCount, doc.getElementsByTagName("ogc:Filter").getLength());
        assertEquals(classCount, doc.getElementsByTagName("sld:PointSymbolizer").getLength());
    } 
     
    @Test(timeout=10000) 
    public void testUniqueValues() throws Exception { 
         
        // build JSON request 
        String wfsUrl = "http://sigma.openplans.org/geoserver/wfs?service=WFS&request=GetCapabilities";
        String featureTypeName = "topp:states";
        String propertyName = "STATE_NAME";
        int paletteID = 1;
         
        StringBuilder jsonRequest = new StringBuilder();
        jsonRequest.append("{");