Get Xml File As JS          
  
   
 


Get Action Returns an Xml attachment as a Javascript Xml object

Get Parameters

  • pageName - The page the Xml is attached to
  • fileName - The Xml file name
  • varName - The variable name for the Xml object

Server Side Javascript for GET method

if(typeof(pageName)=="undefined") { transaction.setResult(transaction.SHOW_PAGE); } else { fileName = transaction.getParameter("fileName"); varName = transaction.getParameter("varName"); xml = js.getPageAttachmentAsXml(pageName,fileName); page = js.getXmlAsJavascript(varName,xml); transaction.sendPage(page); }
by Admin on 21/04/2008 at 10:09 PM