Rahul Kumar

Not able to print

Recommended Posts

Hi,

 
Only using <?xml version="1.0" encoding="UTF-8"?> at the top of XML will not work, you would need to add BOM characters into your XML file.
So you would need to tell us which language you are using, also please send us the code for the file that is generating XML.

Share this post


Link to post
Share on other sites

Hi

What is BOM characters? I'm using swedish language.

I'm using Java to render XML

[b]
package[/b] se.yit.tender.agent;
 
[b]
import[/b] java.io.PrintWriter;
[b]import[/b] java.util.Map;
[b]import[/b] lotus.domino.AgentBase;
[b]import[/b] lotus.domino.AgentContext;
[b]import[/b] lotus.domino.Database;
[b]import[/b] lotus.domino.NotesException;
[b]import[/b] lotus.domino.Session;[b]
import[/b] se.procensor.domino.util.RequestParameter;
[b]import[/b] se.yit.tender.chart.TenderStockChart;
 
[b]
public[/b] [b]class[/b] TenderStockChartAgent [b]extends[/b] AgentBase {

[b]    [/b]
    public [b]void[/b] NotesMain() {
 
	    PrintWriter pw = getAgentOutput();

[b]	    [/b]
[b]	    try[/b] {

		    
		    Session session = getSession();
		    AgentContext agentContext = session.getAgentContext();
		    Database db = agentContext.getCurrentDatabase();
		    TenderStockChart chart = [b]new[/b] TenderStockChart(session, db);
		    Map parameters = RequestParameter.[i]parse[/i](agentContext, RequestParameter.[i]GET[/i]);

		    String orgkey = (String)parameters.get("OrgKey");
		    int type = Integer.[i]parseInt[/i]((String)parameters.get("Type"));
		    int chartType = Integer.[i]parseInt[/i]((String)parameters.get("ChartType"));
		    String xml = chart.getXMLData(chartType, type, orgkey);
		    pw.println("Content-Type: text/xml; charset=UTF-8");
		    pw.println("<?xml version="1.0" encoding="UTF-8"?>");
		    pw.println(xml);
 

	    } [b]catch[/b] (NotesException e) {
		    pw.println("NotesException: "+e.text);
	    } [b]catch[/b] (Exception e) {
		    pw.println("Exception: "+e.getMessage());
	    }

}

}

Johan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now