ishani modi
Posts: 0
Joined: Wed Oct 23, 2013 4:49 am

Add xml file and gets attribute from it

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Add xml file and gets attribute from it

Hi Ishani,

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

ishani modi
Posts: 0
Joined: Wed Oct 23, 2013 4:49 am

Add xml file and gets attribute from it

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 ?

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

Add xml file and gets attribute from it

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

ishani modi
Posts: 0
Joined: Wed Oct 23, 2013 4:49 am

Add xml file and gets attribute from it

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Add xml file and gets attribute from it

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.

ishani modi
Posts: 0
Joined: Wed Oct 23, 2013 4:49 am

Add xml file and gets attribute from it

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Add xml file and gets attribute from it

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.

ishani modi
Posts: 0
Joined: Wed Oct 23, 2013 4:49 am

Add xml file and gets attribute from it

Ok Katya, I will try and let you know

Return to “Issues”