View Xml          
  
   
 


Get Action Returns an Xml file viewer and editor with a tree style GUI

Post Parameters

  • pageName - The name of the page
  • fileName - The name of the xml file to view
  • viewName - The name of the view to apply to the xml


Server Side Javascript for GET method

if(typeof(pageName)=="undefined") { transaction.setResult(transaction.SHOW_PAGE); } else { template = file.getAttachment("/OpenForum/Actions/ViewXml","viewXml.html.template"); fileName = transaction.getParameter("fileName"); viewName = transaction.getParameter("viewName"); if(viewName==null) { viewName = "/OpenForum/Actions/GetAttachmentAsXml/default-view.xml"; } data = js.get2DStringArrayAsHashtable( [["pageName",pageName],["fileName",fileName],["viewName",viewName]] ); pageData = js.getStringGenerator().generateStringWithMask( template,data,'$',';' ); transaction.sendPage( wiki.buildPage("Edit Xml",pageData) ); }
by Admin on 21/04/2008 at 10:08 PM