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.

Cannot Import XML from Website

Featured Replies

  • Newbies

Can't get my head around this...

History

My application exports two files in XML format and the files are then posted on a ColdFusion powered website. I wish to import these two files into runtime copies of my application (on a regular basis), but due to the nature of the website where the files are hosted, the URL stays the same, but the files move location as they are updated, so I cannot point to an absolute path.

e.g http://www.website.com/media.cfm?mediaid=12510

when opened in a browser resolves to

http://www.website.com/media/xmlfiles/p/8/myfile.xml

As I said, when the files are updated, the old files remains (for rollback purposes) and a new file is created (mediaid remains the same, but now points to the new file location).

If I use Import Records from the file menu, select XML Data Source option, select File radio-button and paste the URL http://www.website.com/media.cfm?mediaid=12510 into the File Name box and press Open it will resolve fine and take me to the next step of Import Field Mapping. This is exactly what I want to do under script control, but I cannot. Obviously I want to hide the dialog, but if I leave it open and paste in the URL it works, but I cannot paste it in and expect it to work automatically, as it always fails.

Am I missing something here?

(Apologies for the length of the post)

Edit: the HTTP Request option doesn't work here, hence calling the File dialog.

Edited by Guest

  • Author
  • Newbies

Update

I can make the URL a target of Web Viewer and see the resulting XML, so can I somehow grab the absolute path to the filename for here?

Appreciate any advice guys...

Edited by Guest

  • Author
  • Newbies

SOLVED

Used GetLayoutObjectAttribute ( "WebViewerName" ; "Source" ) which returned the resolved URL including the target xml filename.

Also investigated WGET which turns out to be a very useful utility which downloads the xml file to the local machine.

I may actually stick to using WGET as it's proving to be more flexible (thank you Fenton Jones for mentioning WGET in one of your posts).

Edited by Guest

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.