Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I'm struggling with my first dabble at XML importing to FM. I read some docs, tried this intro intro and it sort of made sense, so I ran it against my Formstack XML source but it just comes up with an error XML parsing error: unable to open primary document entity''

Clearly not working, so I tried to roll my own, and that has got me stuck...

I was trying to adapt comment's contribution but I'm stuck on how Formstack integrates the data, specifically the three questions in the form. I want to gather both the submission data as well as the three custom fields.

This is my trying to learn the ropes on a simple test form so I can try it on other FormStack forms... but I'm not even making forts base, any pointers appreciated!

Here is the roll my own stumble... and getting stuck:

<?xml version="1.0" encoding="UTF-8"?>















0

































































And here is the XML source:




1<?xml version="1.0" encoding="utf-8"?>

    2

    3  

    4    

    5      36647233

    6      2010-08-04 10:05:13

    7      Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8

    8      134.197.93.179

    9      

   10      

   11        

   12          9697119

   13          try1

   14        

   15        

   16          9697123

   17          Jan 02, 2007 01:01 AM

   18        

   19        

   20          9697127

   21          5

   22        

   23      

   24    

   25    

   26      36657999

   27      2010-08-04 14:36:49

   28      Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8

   29      134.197.93.179

   30      

   31      

   32        

   33          9697119

   34          test2

   35        

   36        

   37          9697123

   38          Jan 02, 2005 01:02 PM

   39        

   40        

   41          9697127

   42          5

   43        

   44      

   45    

   46  

   47  2

   48  1

   49undefined

Edited by Guest
correct attribute

And here is the XML source:

Doesn't look that way...

Anyway, your stylesheet has some issues:

needs to be:

should be:

and

should be:

As for the data items, it looks like these should be imported into a child table, using another stylesheet.

---

P.S. My name is not johanelfving.

  • Author

Ahh thanks for the pointers... not going to get far if I'm being inconsistent...

While the structure of the XML suggests a child table, it is in fact a single record, why FormStack generates the XML like this I wouldn't know. The record is a single survey, the basic information is well formed, but the actual three core responses are embedded as:


      

        

          9697119

          try1

        

        

          9697123

          Jan 02, 2007 01:01 AM

        

        

          9697127

          5

        

      

I'm only after the the value label content, but the problem is each value is a different type, Text,date and time,Number...

I thought this would be a simple exercise. hmmm

Then you should have three fields (instead of the one Data field) and fetch their values like this:

...









...

---

Note that "Jan 02, 2007 01:01 AM" is not a date you can import into a Filemaker date field. You need to import it into a text field and deal with it in Filemaker - or use the stylesheet to convert it into a format that Filemaker will recognize as a date or a timestamp.

Edited by Guest

  • Author

OK so I'm simplifying this Formstack down to one item, text so I can at least get something out. But still no luck. The XML validates but I still get the same cryptic FM message.

Ahh I aslo see that "comment" is the contributor... funny!

<?xml version="1.0" encoding="UTF-8"?>



	

	

		

			0

			

			

			

				

				

				

				

				

				



			

			

				

					

						

							

								

							

						

						

							

								

							

						

						

							

								

							

						

						

							

								

							

						

						

							

								

							

						

						

							

								

							

						

					

				

			

		

	





with source file:


<?xml version="1.0" encoding="utf-8"?>



  

    

      36686360

      2010-08-05 11:43:24

      Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8

      134.197.93.179

      

      

        

          9697119

          text1

        

      

    

    

      36686366

      2010-08-05 11:43:37

      Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8

      134.197.93.179

      

      

        

          9697119

          text2

        

      

    

  

  2

  1

Sorry, I was too focused on fixing your stylesheet to notice the error message. This has come up before:

http://fmforums.com/forum/showtopic.php?tid/214465/post/355966/#355966

  • Author

AHHHHH!!!!!

I've wasted your time and mine over FileMaker's inability to make secure data connections!

Yep my xslt worked, but I never tried it from a local xml file as it was just easier to put in Formstack's URL...

I have learned a bit about XML, so not all is lost, but for my work, if it 'ain't secure then it 'aint gonna happen!

Thanks for all who tried to help, especially "comment" who's tricky handle still makes me laugh!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.