What XML structure should my data have?

Stimulsoft Reports.JS discussion
Post Reply
nexar
Posts: 31
Joined: Tue May 02, 2017 5:55 pm

What XML structure should my data have?

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: What XML structure should my data have?

Post by Alex K. »

Hello,

Please check the XML file from the attachment.

Thank you.
Attachments
Capture.PNG
Capture.PNG (61.03 KiB) Viewed 3232 times
data.xml
(741 Bytes) Downloaded 464 times
nexar
Posts: 31
Joined: Tue May 02, 2017 5:55 pm

Re: What XML structure should my data have?

Post 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.
nexar
Posts: 31
Joined: Tue May 02, 2017 5:55 pm

Re: What XML structure should my data have?

Post 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
nexar
Posts: 31
Joined: Tue May 02, 2017 5:55 pm

Re: What XML structure should my data have?

Post 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.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: What XML structure should my data have?

Post by Andrew »

Hello,

Do not worry. It is Okay.

Let us know if you need any help.
Post Reply