javaÉú³ÉXMLÎļþ×Ô¶¯»»ÐÐÎÊÌâ
Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent(" ");//ÉèÖÃËõ½ø
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃ棬ËüÄÜ°Ñxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃ棬¾Í²»ÐÐÁË£¬ÄãÒªÉèÖû»ÐС¢Ëõ½øµÄ¸ñʽ
ÄãΪÁ˼òµ¥£¬¿ÉÒÔÖ±½Óд£º
Java code
XMLOutputter xmlOut = new XMLOutputter(Format.getPrettyFormat());
Ïà¹ØÎĵµ£º
×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......
1.½âÊÍ
ÒòΪjspÓõ½ÁËSiteDataÀ࣬¶øSiteData¼Ì³ÐBasePageÀ࣬
ËùÒÔBasePage¹¹Ô캯Êý
BasePage¹¹Ô캯Êý
initializeByCityCodeº¯Êýmain
keyµÄÖµmain.UpImages
vµÄÖµmain.UpImages
2.Ö´ÐÐÍê BasePage.java
ÖеÄinitCommon()ºó£¬
Ìøµ½SiteData.java ÖÐµÄ process();·½·¨£¬
public SiteData(HttpServletR ......
JAIµÄÈ·ÊǸö²»´íµÄ¶«¶«£¬Í¼ÐÎäÖȾÉÏÌṩÁ˱ȽϺõÄÀà·â×°ÒÔ¼°¿çƽ̨ÐÔ¡£²»ÖªµÀΪºÎJAI¾ÍÔÚ2006ÄêÖ¹²½ÔÚ1.1.3µÄ°æ±¾ÏÂÁË£¬Äª·ÇSun(Oracle)ÕæµÄÈ¥×öJava 2DµÄ·á¸»È¥ÁË¡£ÔÝʱ»¹Ã»Óп´µ½Java 2D·½ÃæµÄ×ÊÁÏ£¬ÏÈ°ÑJAIµÄÄÚÈÝÌù³öÀ´¡£
ÏÂÔØJAI¿ÉÒÔÈ¥ÕâÀï http://download.java.net/media/jai/builds/release/1_1_3/
ÏëÒªÁ˽âËüµÄ° ......
дÈëʱ£¬ÏÈ×öencode£º
public static String encode(String src) {
String result = null;
try {
result = new String(src.getBytes("gbk"), "ISO-8859-1");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
¶Á³öʱ£¬ÔÙ×ödecode£º
public static String deco ......