Parsing XML gives me nothing.

Get help using Construct 2

Post » Thu Jul 24, 2014 6:32 pm

Hi there,
I'm facing strange problem with XML parsing.

Here my XML file genarated from this webservice: http://services.gisgraphy.com/geoloc/search?lat=50.209298&lng=10.245&from=1&to=1

Code: Select all
//this is a simplified version for readers:

"<results xmlns=""http://gisgraphy.com"">

<numFound>1</numFound>
<QTime>293</QTime>

<result>


<name>Poppenlauer</name>
<adm1Code>02</adm1Code>
<adm1Name>Freistaat Bayern</adm1Name>
<asciiName>Poppenlauer</asciiName>
<countryCode>DE</countryCode>   
<gtopo30>257</gtopo30>
<timezone>Europe/Berlin</timezone>
<lat>50.216670989990234</lat>
<lng>10.233329772949219</lng>

</result>

</results>"


IT WORKS only when i change the xmlns to something else, and i can't see any error in C2 nor in chrome javascript console.

Can any one tell me why?

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
B
11
S
3
Posts: 32
Reputation: 821

Post » Thu Jul 24, 2014 8:23 pm

I think the XML plugin expect your root node to be in the null namespace.
B
75
S
31
G
27
Posts: 1,012
Reputation: 20,759

Post » Thu Jul 24, 2014 11:41 pm

Thanks, Yes indeed, i "solved" the problem by replacing 'xmlns' to 'x' when i receive Ajax response, but i'm really disappointed, spending 2 hours for nothing..
Anyway i must report it, can't work with it in that way...

Cheers.
B
11
S
3
Posts: 32
Reputation: 821


Return to How do I....?

Who is online

Users browsing this forum: dop2000, irina and 7 guests