XML module question

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
8/21/2013 1:30:23 PM
Gravatar
Total Posts 121

XML module question

I've just discovered that the XML feature does a little more than the documentation page says (https://www.mojoportal.com/xmlmodule.aspx). I'd always wondered why anyone would want to create their HTML content in such a clunky way with static XML files, but now I see the XML (and XSLT) files can be URLs, therefore represent dynamic content from some XML web service.

OK this seems potentially useful and I've knocked up a simple example to satisfy myself it works, using Geonames XML web services. But I'm immediately wanting to alter parameters in my XML URLs, to represent filter criteria etc.

Obviously it wouldn't be too hard to do this in a custom feature, but I'm just wondering whether there is already anything in this feature to permit this?  For example, maybe a URL parameter could be picked up and injected into the XML URL at runtime if the parameter names matched, or something. This would allow links from other pages to be configured to show specific things on the page with the XML feature (e.g. a list of products in a certain category); or it would allow search interfaces to be designed incredibly easily against remote web services.

Thinking aloud really, but wanting to know what it can do now before hatching crazy plans or logging feature requests...

8/22/2013 1:19:41 PM
Gravatar
Total Posts 18439

Re: XML module question

Originally it was limited to local files and later support for urls was added. 

If you want to do something more you would need to write a custom feature, but you could easily borrow code from the existing feature, there is really very little to it if you look at the code. The implementation is trivial and could be easily replicated and extended in a custom feature.

Hope that helps,

Joe

8/22/2013 2:52:40 PM
Gravatar
Total Posts 533
feet planted firmly on the ground

Re: XML module question

Thanks Joe - agreed - simple to adapt for all kinds of useful purposes.

Perhaps the documentation page could be updated to reflect the fact that the provided feature can now take files from URLs as well as local files.

 

8/23/2013 10:19:10 AM
Gravatar
Total Posts 18439

Re: XML module question

I've added a note to the bottom of that article mentioning that the xml and xsl files can also be specified as urls.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.