@Test public void testRemoveInvalidXMLChars() throws Exception { SimpleFeatureType ft = DataUtilities.createType("invalidChars", "the_geom:Point,data:String"); SimpleFeature feature = SimpleFeatureBuilder.build( ft, new Object[] { new WKTReader().read("POINT(0 0)"), "One " + ((char) 0x7) + " test" }, "123"); SimpleFeatureCollection fc = DataUtilities.collection(feature); FeatureTransformer tx = new FeatureTransformer(); tx.setIndentation(2); tx.getFeatureTypeNamespaces().declareNamespace(ft, "gt", "http: ByteArrayOutputStream bos = new ByteArrayOutputStream(); tx.transform(fc, bos); String result = bos.toString(); Document dom = XMLUnit.buildControlDocument(result); assertXpathEvaluatesTo("1", "count( assertXpathEvaluatesTo("One test", " }
public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; } }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  void setCollectionNamespace(String nsURI); String getCollectionNamespace(); void setCollectionPrefix(String prefix); String getCollectionPrefix(); void setNumDecimals(int numDecimals); void setPadWithZeros(boolean padWithZeros); void setForceDecimalEncoding(boolean forceDecimalEncoding); NamespaceSupport getFeatureNamespaces(); FeatureTypeNamespaces getFeatureTypeNamespaces(); void addSchemaLocation(String nsURI, String uri); void setSrsName(String srsName); void setLockId(String lockId); void setGmlPrefixing(boolean prefixGml); void setFeatureBounding(boolean featureBounding); void setCollectionBounding(boolean collectionBounding); org.geotools.xml.transform.Translator createTranslator(ContentHandler handler); }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  void setCollectionNamespace(String nsURI); String getCollectionNamespace(); void setCollectionPrefix(String prefix); String getCollectionPrefix(); void setNumDecimals(int numDecimals); void setPadWithZeros(boolean padWithZeros); void setForceDecimalEncoding(boolean forceDecimalEncoding); NamespaceSupport getFeatureNamespaces(); FeatureTypeNamespaces getFeatureTypeNamespaces(); void addSchemaLocation(String nsURI, String uri); void setSrsName(String srsName); void setLockId(String lockId); void setGmlPrefixing(boolean prefixGml); void setFeatureBounding(boolean featureBounding); void setCollectionBounding(boolean collectionBounding); org.geotools.xml.transform.Translator createTranslator(ContentHandler handler);  }