These parameters allow you to limit what you extract from the GML. It's a bit odd to have it in the format descriptor, as this originates from the way WFS requests are done (you'll find the same namespace and type there).
In your example, your GML already is very flat, without any a "superstructure" (all features are equal, next to each other), so you should just leave both of these empty (read everything from the file as-is).
If you have issues with this, I seem to remember that OL changed some things around, so since OL 3.x you can just use a ol.format.WFS()
(without any extra options necessary. You can still use projection if you want.) to parse simple GML data.
Additional explanation:
WFS offer their features with unique names in this style: app:river
.
featureType
is the feature you want from the WFS service. this is what you get in your getCapabilities request (as a WFS can offer multiple featuretypes at once). So you would set river
here.
The featureNS
is an additional WFS parameter, which has to be specified if your features are from a specific namespace. This is simply the prefix of each feature your WFS provides (the string before the :
). In this case, app
. Your WFS could also offer different namespaces, e.g. a app2:river
, in which case this would be relevant. These are the unusual cases the OL docs try to explain (what to do when you want to request multiple featuretypes from multiple namespaces in a single WFS request).
If you have complicated data, the GML can have the features with this "superstructure" intact, sorting them into namespaces and featuretypes. In that case, you can add these values to your GML format object to filter the data.