Page 1 of 1

getting value from rest XML

Posted: Sun Sep 21, 2014 10:45 am
by Dirk Gissing

Hello,

I have a question regarding getting values form a REST service made in XML.
The XML output looks like this:

code
<body>
<team>Barcelona</team>
<score for="1" against="2">1 - 2</score>
</body>
/code

When I map the response to an element and I edit the javascript inside that element, I do the following:

code
Your Team: value&#46;team;
Your Score: value&#46;score;
/code

The team shows, but the score output gives me undefined or empty. How do I get the score output? I'm guessing because the score ouput has attributes like "for" and "against" that value.score or value.score.content does not work.

So how do I do this?

Thank you!


getting value from rest XML

Posted: Sun Sep 21, 2014 6:38 pm
by Dirk Gissing

Anyone??


getting value from rest XML

Posted: Sun Sep 21, 2014 8:00 pm
by Maryna Brodina

Hello!

I am sorry for delay! We'll update as soon as have more information.


getting value from rest XML

Posted: Mon Sep 22, 2014 4:04 am
by Yurii Orishchuk

Hi Dirk,

Unfortunatly here is not enough information about your implementation.

Please provide us screen shots of your implementation.

Where you use this code, etc...

Also if you use this code in "success" event with type JS - you have in "data" - XML document object.

Your response parameters should as follows:

http://prntscr.com/4p58yc/direct

Then you can map needed parameter directly to needed components.

http://prntscr.com/4p597n/direct

Regards.


getting value from rest XML

Posted: Mon Sep 22, 2014 2:47 pm
by Dirk Gissing

problem solved!