Loading...
 
Update an XML file stored in a File Gallery

Plugin XMLUPDATE

Introduced in Tiki15 and backported to Tiki 12.5 and Tiki14.2

Use this wiki plugin to easily update selected, multiple elements of an XML file stored in a File Gallery, by using a form in the wiki page.

This plugin was originally developed so that Tiki managed 'control' XML files could be downloaded by multiple Raspberry Pi's that are used for data collection and other IoT purposes, and where the updating of individual elements of the control file could be delegated to individual Tiki users.

Many other uses will however be possible.

XML file requirements


The XML file is stored in a File Gallery and File Galleries must (at present) use the option to store all files in a Directory.

The XML file must also be a simple structure that does not repeat any of the node names as names are searched for irrespective of what 'level' they are at.

The following file is used as a worked example in this documentation:

Copy to clipboard
<?xml version="1.0"?> <management> <servername description="the host name of the Pi server">pitiki01</servername> <control description=""> <stopimaging description="">no</stopimaging> <starttime description="">07:00</starttime> <stoptime description="">22:30</stoptime> <suspendimaging description="">no</suspendimaging> </control> <sitedata description=""> <uploadgallery description="">4</uploadgallery> <uploadname description="">kitchen_image</uploadname> <downloadgallery description="">5</downloadgallery> <downloadXMLfileId description="tiki fileId for the XML file">1</downloadXMLfileId> <cookiepath description="">/home/pi/pirepo_cookies/</cookiepath> <cookiefile description="">pitiki01-cookies.txt</cookiefile> </sitedata> <intervals description=""> <uploadinterval description="">300</uploadinterval> <downloadXMLinterval description="">1800</downloadXMLinterval> </intervals> </management>

Parameters

Allows multiple elements of an XML file stored in a File Gallery to be updated - the File Gallery (at present) is assumed to store all files in a Directory.
Introduced in Tiki 15. Required parameters are in bold.
Go to the source code
Preferences required: wikiplugin_xmlupdate

Parameters Accepted Values Description Default Since
(body of plugin) list (one per line) of the XML element (node) names irrespective of their path and must (at present) be unique in the file
fileId digits File Id of the XML file stored in a File Gallery which is assumed to store its data in a directory 15.0
attribute text optional use of an attribute for the XML nodes - used as a label in the input form. If used then all nodes in the XML file should have the attribute text set even if it is a blank/space 15.0
namelisted yes
no
yes/no option to include the XML node name in the plugin output - default is yes - and should always be yes if the attribute parameter is not used or not all the nodes have their attribute text set yes 15.0

Example


The following is the code for the worked example:

Copy to clipboard
{XMLUPDATE(fileId="1281" attribute="description" namelisted="yes")} servername notinXMLfile downloadXMLfileId downloadXMLinterval {XMLUPDATE}

As you can see the node names that are being updated are simply listed in the plugin body, and as illustrated in this example, blank lines are ignored and any node names that are not in the XML file will be flagged as 'not found'.

The resulting output screen shot from this example is below

XMLUPDATE Tiki Example


The output format for the form includes the text just above the form which confirms the number of node names being considered and provides basic text for what to do.

The form is structured as a table and depending upon what theme is being used some padding may need to be applied to the table cells to make the form look 'nice'.




doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki