Page 1 of 1

Add xml file and gets attribute from it

Posted: Wed Apr 02, 2014 11:42 am
by ishani modi

Hello,

I have added new .xml file in source tab. I want the attribute from that xml file.
How can I get attribute which I have added to xml ?

Thanks in advance,
Ishani


Add xml file and gets attribute from it

Posted: Wed Apr 02, 2014 1:44 pm
by Kateryna Grynko

Hi Ishani,

Do you want to read the file content using a service?


Add xml file and gets attribute from it

Posted: Wed Apr 02, 2014 1:55 pm
by ishani modi

Hi,
No I don't want to read using service.
In source tab I added 1 file details.xml inside it there are diiferent tags.
I want to read that tags on page show event. So how can I read those tags ?


Add xml file and gets attribute from it

Posted: Wed Apr 02, 2014 4:50 pm
by Maryna Brodina

Hello!
Upload this file using REST service and specify relative path to file in URL.


Add xml file and gets attribute from it

Posted: Thu Apr 03, 2014 5:41 am
by ishani modi

Hi Maryna,
Sorry I am not getting you what you are trying to say


Add xml file and gets attribute from it

Posted: Thu Apr 03, 2014 8:45 am
by Kateryna Grynko

Hi Ishani,

For example, you add a file 'test.xml' in a root 'web_resources'.
Then you add the following URL in a service parameter: codetest.xml/code

Please note service Test tab won't work in this case. You would need to test only the whole application either on device or in desktop browser.


Add xml file and gets attribute from it

Posted: Thu Apr 03, 2014 9:51 am
by ishani modi

Hi,
I am not getting any of the response from URL. then why should I set as parameter ?
I just want to read values from XML which is static


Add xml file and gets attribute from it

Posted: Thu Apr 03, 2014 12:18 pm
by Kateryna Grynko

Ishani,

You need to refer to the file somehow. URL parameter can be used to do this. It will be stored locally, so you can use a relative path.


Add xml file and gets attribute from it

Posted: Thu Apr 03, 2014 2:46 pm
by ishani modi

Ok Katya, I will try and let you know