XmlListModel-XmlRole query problem
-
Hi,
I have big problems for using xmllistmodel. First one is about give source to XmlListModel. I want to give it dynamically. For instance after app start i push a button for triggered the process and using the XmlHttpRequest i get an xml response. But i could't give the source of the XmlListModel.
Second problem about XmlRole's query. Here is my xml:<?xml version="1.0" encoding="UTF-8" ?>
<wfs:featurecollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml" xmlns:tkgm="http://www.tkgm.gov.tr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation="http://www.tkgm.gov.tr http://10.210.75.110:9091/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=TKGM%3Ailler http://www.opengis.net/wfs http://10.210.75.110:9091/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
gml:boundedby
gml:nullunknown</gml:null>
</gml:boundedby>
gml:featuremember
<tkgm:iller fid="iller.1">
tkgm:tapukimlikno23</tkgm:tapukimlikno>
tkgm:adAdana</tkgm:ad>
tkgm:geom
<gml:polygon srsname="http://www.opengis.net/gml/srs/epsg.xml#4326">
gml:outerboundaryis
gml:linearring
<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">
</gml:coordinates>
</gml:linearring>
</gml:outerboundaryis>
</gml:polygon>
</tkgm:geom>
tkgm:durum3</tkgm:durum>
</tkgm:iller>
</gml:featuremember>
</wfs:featurecollection>
Here is my XmlListModel
XmlListModel { id:xmllistmodel query:"/wfs:FeatureCollection/gml:featureMember/TKGM:iller" XmlRole{ name: "parselno"; query:"TKGM:tapukimlikno/string()" }
}
Problem is about colons (:). I coulnd't write query in XmlRole. I got error that named 'Invalid Query TKGM:tapukimlikno/string()' when app starts. I research XPath syntax and other things about Xpath and i tried many ways (@, //, [ ], *) but i cannot make it. My purpose is giving roles to XmlListModel and get an response object list then give it ListView to show .Sorry about my poor english :)
Thank you.