Dirk Gissing
Posts: 0
Joined: Sat Oct 12, 2013 4:18 pm

getting value from rest XML

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!

Dirk Gissing
Posts: 0
Joined: Sat Oct 12, 2013 4:18 pm

getting value from rest XML

Anyone??

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

getting value from rest XML

Hello!

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

getting value from rest XML

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.

Dirk Gissing
Posts: 0
Joined: Sat Oct 12, 2013 4:18 pm

getting value from rest XML

problem solved!

Return to “Issues”