Question

Read XML via Web

  • 25 October 2013
  • 3 replies
  • 11 views

Hi there,

 

 

I am new to XML and the FME resources availible have been great so far.

I am stumped though.

I am trying to read a dynamic XML file via the web (similar to RSS I would assume).

 

 

At this point I can access an XML file via the web and can save this file onto my local computer. Once that is done I take this XML file and use FME to flatten it for attributes and can also add in a 2D point to populate coordinate information... I am loving the FME funcationality so far.

 

 

Where I am stuck is that I would like to have FME connect into to a web source to read an flatten the XML file instead of having to access the XML via a web browser and then save the XML file onto my local machine.

 

 

If I plug in the XML url into a FME reader I get an error, here is an example of the error:

 

 

"Sending HTTP 'GET' request to 'http://www.enetpulse.com/wp-content/uploads/sample_xml_feed_enetpulse_soccer.xml', waiting for response ...

The uri-map document 'C:\\apps\\FME\\xml\\urimap\\gml_aixm.xml' is being used to map from URI to URI

The uri-map document 'C:\\apps\\FME\\xml\\urimap\\gml_citygml.xml' is being used to map from URI to URI

The uri-map document 'C:\\apps\\FME\\xml\\urimap\\gml_inspire.xml' is being used to map from URI to URI

The uri-map document 'C:\\apps\\FME\\xml\\urimap\\gml_urimap.xml' is being used to map from URI to URI

HTTP transfer error: 'Couldn't connect to server'

XML Parser error: 'Error in input dataset:'http://www.enetpulse.com/wp-content/uploads/sample_xml_feed_enetpulse_soccer.xml' line:1 column:1 message:invalid document structure'

The XML Module halted on error, see the logfile for details"

Am I way off here? Is it possible for me to live link to a web based XML file and then parse this link to populate attributes? Does this operation require FME Server fucntionality?

 

 

Keen to know how far off base I am here!

 

 

Cheers!

3 replies

Userlevel 3
Badge +13
Hi,

 

 

Is it possible for me to live link to a web based XML file and then parse this link to populate attributes?

 

 

Yes, by setting the reader to the url.

 

 

Does this operation require FME Server fucntionality?

 

 

No, the XML reader can read from a url.

 

 

The error you are getting can be due to the server beeing down, I have tried your url and it works just fine in the XML reader.

 

BTW are you specifying any elements to match? (sport for example?)

 

 

Hope this helps,

 

Itay

 

 

Thanks Itay!

 

 

Turns out I just needed to plug in my network credentials under network settings. Now I am off running and everything else is a breeze thanks to the training resources availible here.

 

 

Thanks again!
Userlevel 3
Badge +13
Glad to hear that you got it working, yes the info about XML is great check out some of the YouTube vids on the FME channel for some additional demos 

 

 

Itay

Reply