New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

How do I dump my topics' formfields out as XML?

Use the following macros:
  • An outer VarSEARCH or VarFORMAT to iterate over the topics of interest
  • An inner VarFORMAT to iterate over each formfield name
  • The list of formfield names generated by a VarQUERY expression such as
The following example dumps the formfields from the user topics of users who are members of InfrastructureTaskTeamGroup (inspired by Tasks.Item10935):

%STARTSECTION{"xmlusers"}%<noautolink><literal><?xml version='1.0' encoding='%QUERY{"{Site}{CharSet}"}%'?>
  "%GROUPINFO{"InfrastructureTaskTeamGroup" separator="," format="$wikiusername"}%"
  format="$percntINCLUDE{\"%TOPIC%\" section=\"dotopic\" web=\"$web\" topic=\"$topic\"}$percnt"

  header="  <topic path='%web%.%topic%'>$n"
  format="    <$item>$percntQUERY{'%web%.%topic%'/$item}$percnt</$item>"
  footer="$n  </topic>"

Support.FAQForm edit

TopicClassification FrequentlyAskedQuestion
Subject Data forms, Other...
Topic Summary Demonstrate usage of QUERY and FORMAT to export formfield data in XML
Interested Parties
Related Topics Tasks.Item10935
Topic revision: r2 - 27 Dec 2011, ArthurClemens - This page was cached on 20 Mar 2018 - 12:53.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License