Page 1 of 1

What XML structure should my data have?

Posted: Mon May 15, 2017 12:34 pm
by nexar
I have the following test XML file which I'm trying to use inside the Web JS designer. To do this I created an xml connection using the following parameters:

Name : Cities
Alias : Cities
XML Type : Xml
Path to XML Data : /home/purvez/DevSW/Stimulsoft/Cities.xml

The data inside the file looks like this:

Code: Select all

	<Cities>
		<City>
			<id>1</id>
			<CityName>London</CityName>
		</City>
		<City>
			<id>2</id>
			<CityName>Paris</CityName>
		</City>
	</Cities>
However when I create the connection it is not showing me any tables. I was expecting to see table Cities.

I have tried removing the <Cities> node but that didn't make any difference. Please can someone tell me if I need to add any additional nodes or do something else to allow the Web Designer to recognise the data in the JS version.

Many thanks

Purvez

Re: What XML structure should my data have?

Posted: Tue May 16, 2017 6:50 am
by Alex K.
Hello,

Please check the XML file from the attachment.

Thank you.

Re: What XML structure should my data have?

Posted: Tue May 16, 2017 9:18 am
by nexar
Aleksey, thanks very much for the response. I tried to use that file but after I create the connection I get Import Data screen but without any of the tables underneath. I had set the XML Type field to be Xml.

Here is the info I entered to created the connection:
Image

and then this is the Import Data screen that I get:
Image

I'm clearly not understanding something here. Thanks for your continued help.

Re: What XML structure should my data have?

Posted: Tue May 16, 2017 9:36 am
by nexar
Just to clarify I'm using the JS directory under the 2017.1.3-Pack/Libs. Do I need to use anything else as well? My connections to MySQL data all work fine.

Thanks

Re: What XML structure should my data have?

Posted: Tue May 16, 2017 11:59 am
by nexar
I just realised what the problem was. Since I'm calling up the JS designer from a web page it needed the data to be relative to the path of the web page. My data.xml was not initially inside my web folder. By moving it there I have been able to get the data.

I'm sorry for having wasted your time.

Thanks for all your patience and help.

Re: What XML structure should my data have?

Posted: Wed May 17, 2017 10:48 am
by Andrew
Hello,

Do not worry. It is Okay.

Let us know if you need any help.