There are a few different ways.
Probably the easiest is to use getXpathValue()
Search the widgets for an example. It is used in DeleteFeature,
InsertFeature, Measurement widgets.
You might also want to search the code for mbDebugMessage() as an
alternative way to display debug messages.
Toan Nguyen wrote:
> Hi all,
> I want to get some information from the FeatureCollection. So, I have
> done flowing:
>
> mydoc = config.objects['featureCollectionOne'].doc;
> featureMembers =
> mydoc.selectNodes('/wfs:FeatureCollection/gml:featureMember');
> for( i = 0; i < featureMembers.length; i++ )
> {
> texteNode =
> featureMembers[i].selectSingleNode('/durbuy:pa_83012/durbuy:texte');
>
> alert(texteNode);
> }
>
> I get "null".
>
> This is the content fo the FeatureCollection:
>
> <wfs:FeatureCollection
> xsi:schemaLocation="http://localhost:8080/geoserver/durbuy
>
> http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=durbuy:pa_83012
> http://www.opengis.net/wfs
> http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
> <gml:boundedBy>
> <gml:Box
> srsName="http://www.opengis.net/gml/srs/epsg.xml#31300">
> <gml:coordinates decimal="." cs="," ts="
> ">224957.34375,124599.640625 225452.078125,124932.25</gml:coordinates>
> </gml:Box>
> </gml:boundedBy>
> <gml:featureMember>
> <durbuy:pa_83012 fid="pa_83012.3">
> <durbuy:ins_t>83012</durbuy:ins_t>
> <durbuy:ins>83012</durbuy:ins>
> <durbuy:ver>V01</durbuy:ver>
> <durbuy:texte>83007A025000A000</durbuy:texte>
> <durbuy:the_geom>.............</durbuy:the_geom>
> </durbuy:pa_83012>
> </gml:featureMember>
> <gml:featureMember>
> <durbuy:pa_83012 fid="pa_83012.4">
> <durbuy:ins_t>83012</durbuy:ins_t>
> <durbuy:ins>83012</durbuy:ins>
> <durbuy:ver>V01</durbuy:ver>
> <durbuy:texte>83007A024300D000</durbuy:texte>
> <durbuy:the_geom>........</durbuy:the_geom>
> </durbuy:pa_83012>
> </gml:featureMember>
> </wfs:FeatureCollection>
>
>
> And I want to get all the content of durbuy:texte tag. Please help me.
> Thank you so much.
>
>
> --
> Nguyễn Đình Toán
>
> -------------------------
> Neu khong doc duoc tieng Viet, vui long vao menu View --> chon
> Encoding --> chon Unicode (UTF-8). Cam on.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mapbuilder-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
>
--
Cameron Shorter
Geospatial Systems Architect
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254
Think Globally, Fix Locally
Commercial Support for Geospatial Open Source Solutions
http://www.lisasoft.com/LISAsoft/SupportedProducts.html
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users