以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML源码及示例(仅原创和转载) 』  (http://bbs.xml.org.cn/list.asp?boardid=32)
----  紧急求助 谁用过SVG 进来看下 加我下好吗  (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=84527)


--  作者:尘封忆
--  发布时间:4/28/2010 4:31:00 PM

--  紧急求助 谁用过SVG 进来看下 加我下好吗
我在servlet里边用out.println("<svg>"); 循环输出一个SVG图片

  输出完了后 查看源代码 也是生成了三个 但浏览器页面就显示一个 不知道什么原因

懂SVG的加下QQ 帮下忙 或者用过的加下 QQ155274896


--  作者:admin
--  发布时间:4/28/2010 11:50:00 PM

--  
你代码写得有问题,请贴出来。
--  作者:尘封忆
--  发布时间:4/29/2010 8:30:00 AM

--  这是代码 我把循环调到上边了 下边不知道控制这个图形
package json;
import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
public class servletcar extends HttpServlet{
 public void service(HttpServletRequest request,
   HttpServletResponse response)
   throws ServletException,IOException{
  String id = request.getParameter("id");
  int carremove=-300;
  String driverClassName = "oracle.jdbc.driver.OracleDriver";
  String url = "jdbc:oracle:thin:@192.168.10.217:1521:srbwtb";
  String username = "srbwtb";
  String password = "srbwtb";
  try{
   Class.forName(driverClassName);
   Connection conn = DriverManager.getConnection(url, username,
     password);
   String sql = "select * from LOCOMT a"+" where a.group_num =? ";
   System.out.println(sql);
   PreparedStatement stat = conn.prepareStatement(sql);
   String aa="JC00001";
   stat.setString(1, aa);
   ResultSet rst = stat.executeQuery();
   System.out.println(rst);
   response.setContentType("image/svg+xml;charset=utf-8");
   PrintWriter out = response.getWriter();
   
   out.println("<?xml version='1.0' encoding='UTF-8' standalone='no'?>");
   out.println("<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>");
   out.println("<!-- 由 Microsoft Visio 2003, SVG Export, v1.0 生成 2.svg 页-1 -->");
   while(rst.next()){
   out.println("<svg xmlns='http://www.w3.org/2000/svg' xmlns:v='http://schemas.microsoft.com/visio/2003/SVGExtensions/'  width='1.1in' height='10in' x='100in' y='100in' viewBox='"+carremove+" 0 100 100' xml:space='preserve' color-interpolation-filters='sRGB' class='st9'>");
   carremove=carremove-360;
   out.println("<v:documentProperties v:langID='2052' v:metric='true' v:viewMarkup='false'/>");

   out.println("<style type='text/css'>");
   out.println("<![CDATA[");
   out.println(".st1 {fill:#0070c0;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}");
   out.println(".st2 {fill:#ff00ff;fill-opacity:0;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0;stroke-width:0.24}");
   out.println(".st3 {fill:url(#grad31-10);stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}");
   out.println(".st4 {fill:url(#grad30-16);stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}");
   out.println(".st5 {fill:url(#grad32-20);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72}");
   out.println(".st6 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}");
   out.println(".st7 {fill:#ff0000;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}");
   out.println(".st8 {fill:#000000;font-family:宋体;font-size:0.666664em}");
   out.println(".st9 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}");
   out.println("]]>");
   out.println("</style>");
   
   out.println("<defs id='Patterns_And_Gradients'>");
   out.println("<pattern id='grad31-10' v:fillPattern='31' v:foreground='#00b050' v:background='#00ec6a' x='0' y='0' width='1' height='1' patternContentUnits='objectBoundingBox'>");

   out.println("<path d='M 0 0 L 0 1 L 1 1 z' style='fill:url(#grad28-11)'/>");
     out.println("<path d='M 0 0 L 1 0 L 1 1 z' style='fill:url(#grad25-12)'/>");
    out.println("</pattern>");
    out.println("<linearGradient id='grad28-11' v:fillPattern='31' v:foreground='#00b050' v:background='#00ec6a' x1='0' y1='0' x2='0' y2='1'>");
     out.println("<stop offset='0' style='stop-color:#00b050;stop-opacity:1'/>");
     out.println("<stop offset='1' style='stop-color:#00ec6a;stop-opacity:1'/>");
    out.println("</linearGradient>");
    out.println("<linearGradient id='grad25-12' v:fillPattern='31' v:foreground='#00b050' v:background='#00ec6a' x1='0' y1='0' x2='1' y2='0'>");
     out.println("<stop offset='0' style='stop-color:#00b050;stop-opacity:1'/>");

     out.println("<stop offset='1' style='stop-color:#00ec6a;stop-opacity:1'/>");
    out.println("</linearGradient>");
    out.println("<linearGradient id='grad30-16' v:fillPattern='30' v:foreground='#00b050' v:background='#00ec6a' x1='0' y1='1' x2='0' y2='0'>");
     out.println("<stop offset='0' style='stop-color:#00b050;stop-opacity:1'/>");
     out.println("<stop offset='1' style='stop-color:#00ec6a;stop-opacity:1'/>");
    out.println("</linearGradient>");
    out.println("<pattern id='grad32-20' v:fillPattern='32' v:foreground='#00b050' v:background='#00ec6a' x='0' y='0' width='1' height='1' patternContentUnits='objectBoundingBox'>");
     out.println("<path d='M 0 1 L 0 0 L 1 0 z' style='fill:url(#grad27-21)'/>");
     out.println("<path d='M 0 1 L 1 1 L 1 0 z' style='fill:url(#grad28-11)'/>");

    out.println("</pattern>");
    out.println("<linearGradient id='grad27-21' v:fillPattern='32' v:foreground='#00b050' v:background='#00ec6a' x1='1' y1='0' x2='0' y2='0'>");
     out.println("<stop offset='0' style='stop-color:#00b050;stop-opacity:1'/>");
     out.println("<stop offset='1' style='stop-color:#00ec6a;stop-opacity:1'/>");
    out.println("</linearGradient>");
    out.println("</defs>");
    
   
    out.println("<g v:mID='0' v:index='1' v:groupContext='foregroundPage'>");
   out.println("<title>页-1</title>");
   out.println("<v:pageProperties v:drawingScale='0.0393701' v:pageScale='0.0393701' v:drawingUnits='24' v:shadowOffsetX='8.50394' v:shadowOffsetY='-8.50394'/>");
   
   out.println("<g id='group49-1' transform='translate(0.24,-0.24)' v:mID='49' v:groupContext='group'>");
   out.println("<title>工作表.49</title>");
  
       out.println("<g id='shape50-2' v:mID='50' v:groupContext='shape' transform='translate(0,-35.4907)'>");
       out.println("<title>Rectangle.80</title>");
       out.println("<v:userDefs>");
       out.println("<v:ud v:nameU='visVersion' v:val='VT0(12):26'/>");
       out.println("</v:userDefs>");
//rect 方块的
       out.println("<rect x='1' y='35.9707' width='135.196' height='70.9814' class='st1'/>");
       out.println("</g>");
 //----2
       out.println("<g id='group51-4' transform='translate(10.9887,-42.0002)' v:mID='51' v:groupContext='group'>");
       out.println("<v:custProps>");
       out.println("<v:cp v:nameU='ShapeClass' v:lbl='ShapeClass' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(连接性)'/>");
       out.println("<v:cp v:nameU='ShapeType' v:lbl='ShapeType' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(概念)'/>");
       out.println("<v:cp v:nameU='SubShapeType' v:lbl='SubShapeType' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(网关)'/>");
       out.println("<v:cp v:nameU='Manufacturer' v:lbl='制造商' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='ProductNumber' v:lbl='产品编号' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");

       out.println("<v:cp v:nameU='PartNumber' v:lbl='部件号' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='ProductDescription' v:lbl='产品说明' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
          out.println("<v:cp v:nameU='AssetNumber' v:lbl='资产号' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='SerialNumber' v:lbl='序列号' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
                out.println("<v:cp v:nameU='Location' v:lbl='位置' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='Building' v:lbl='建筑物' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='Room' v:lbl='房间' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052' />");
       out.println("<v:cp v:nameU='NetworkName' v:lbl='网络名称' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='IPAddress' v:lbl='IP 地址' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");

       out.println("<v:cp v:nameU='SubnetMask' v:lbl='子网掩码' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='AdminInterface' v:lbl='管理接口' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false'  v:langID='2052'/>");
       out.println("<v:cp v:nameU='NumberofPorts' v:lbl='端口数目' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='MACAddress' v:lbl='MAC 地址' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false'  v:langID='2052'/>");
       out.println("<v:cp v:nameU='CommunityString' v:lbl='团体字符串' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='NetworkDescription' v:lbl='网络说明' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
          out.println("</v:custProps>");
          out.println("<v:userDefs>");
       out.println("<v:ud v:nameU='HasText' v:val='VT0(1):5'/>");

       out.println("<v:ud v:nameU='ShapeClass' v:val='VT0(4):26'/>");
       out.println("<v:ud v:nameU='ShapeType' v:val='VT0(7):26'/>");
       out.println("<v:ud v:nameU='SubShapeType' v:val='VT0(30):26'/>");
       out.println("<v:ud v:nameU='visLegendShape' v:val='VT0(2):26'/>");
       out.println("<v:ud v:nameU='SolSH' v:val='VT14({BF0433D9-CD73-4EB5-8390-8653BE590246}):41'/>");
       out.println("<v:ud v:nameU='visVersion' v:prompt='' v:val='VT0(12):26'/>");
       out.println("</v:userDefs>");
       out.println("<title>Gateway</title>");

       out.println("<desc>A</desc>");
      
       
       out.println("<g id='shape52-5' v:mID='52' v:groupContext='shape' transform='translate(-3.20149,0)'>");
       out.println("<title>工作表.52</title>");
       out.println("<path d='");
       out.println("M34.04 69.79 L34.04 73.11 A16.4319 16.9809 0 0 1 35.03 76.51 A11.2366 11.612 -180 0 0 34.04 69.79 Z M34.02 91.46 L34.02 83.76 A12.3279 12.7397 -180 0 0 35.11 79.63 A15.0879 15.592 -180 0 0 35.03 76.83");
          out.println(" A12.8033 13.231 0 0 1 34.02 79.98 L34.02 73.11 L34.02 69.79 L34.02 59.75 L17.96 50.17 L1.91 59.75");
           out.println("L1.91 77.83 A2.19803 2.27146 -180 0 0 0.03 80.46 L0.03 82.29 A2.13159 2.2028 0 0 1 1.91 81 L1.91");
           out.println("84.82 A3.70741 3.83126 0 0 1 0.05 82.29 L0.04 84.57 A4.24376 4.38553 -180 0 0 1.91 88.15 L1.91 97.37");
           out.println("L17.96 106.95 L34.02 97.37 L34.02 94.79 L36.35 96.18 L36.35 92.85 L34.02 91.46 Z M35.03 76.83 A12.8033");
           out.println(" 13.231 -180 0 0 35.06 76.66 A16.4319 16.9809 -180 0 0 35.03 76.51 A11.2366 11.612 0 0 1 35.01 76.67");
           out.println("A15.0879 15.592 0 0 1 35.03 76.83 Z' class='st2'/>");
     out.println("</g>");
      
    out.println("<g id='shape53-7' v:mID='53' v:groupContext='shape' transform='translate(16.0542,0)'>");
       out.println("<title>工作表.53</title>");
       out.println("<path d='M0 69.32 L0 106.95 L16.05 97.37 L16.05 59.75 L0 69.32 Z' class='st3'/>");
    out.println("</g>");
      
    out.println("<g id='shape54-13' v:mID='54' v:groupContext='shape' transform='translate(0,-37.6277)'>");
       out.println("<title>工作表.54</title>");
       out.println("<path d='M0 97.37 L16.05 106.95 L32.11 97.37 L16.05 87.79 L0 97.37 Z' class='st4'/>");
    out.println("</g>");
      
    out.println("<g id='shape55-17' v:mID='55' v:groupContext='shape'>");
       out.println("<title>工作表.55</title>");
       out.println("<path d='M0 97.37 L16.05 106.95 L16.05 69.32 L0 59.75 L0 97.37 Z' class='st5'/>");
    out.println("</g>");
      
   out.println("<g id='shape56-22' v:mID='56' v:groupContext='shape'>");
       out.println("<title>工作表.56</title>");
       out.println("<path d='M0 59.75 L0 97.37 L16.05 106.95 L32.11 97.37 L32.11 59.75 L16.05 50.17 L0 59.75' class='st6'/>");
    out.println("</g>");
      
    out.println("<g id='shape57-25' v:mID='57' v:groupContext='shape' transform='translate(8.06765,-15.0853)'>");
       out.println("<title>工作表.57</title>");

       out.println("<path d='");
       out.println("M0 98.77 L4.4 95.72 L4.41 99.82 L6.68 101.15 A12.8033 13.231 -180 0 0 25.08 91.75 A16.4319 16.9809 -180");
          out.println(" 0 0 24.06 88.2 L24.06 84.87 A11.2366 11.612 0 0 1 25.03 91.76 A15.0879 15.592 0 0 1 25.14 94.72");
          out.println(" A12.3279 12.7397 0 0 1 6.68 104.47 L4.34 103.07 L4.33 106.95 L0 98.77 Z' class='st7'/>");
      out.println("</g>");
      
      out.println("<g id='shape58-27' v:mID='58' v:groupContext='shape' transform='translate(-1.90865,-18.7972)'>");
       out.println("<title>工作表.58</title>");
       out.println("<path d='");
       out.println("M9.79 102.43 L5.51 94.18 L5.53 98.26 L3.03 96.77 A2.19803 2.27146 -180 0 0 0.03 99.26 L0.04 103.37 A4.24376");
          out.println(" 4.38553 -180 0 0 1.91 106.95 L1.91 103.63 A3.70741 3.83126 0 0 1 0.05 101.09 A2.08251 2.15208 0");
          out.println(" 0 1 3.03 100.1 L5.53 101.59 L5.46 105.47 L9.79 102.43 Z' class='st7'/>");
      out.println("</g>");
      
      out.println("<g id='shape59-29' v:mID='59' v:groupContext='shape' transform='translate(31.9491,-10.7709)'>");
       out.println("<title>工作表.59</title>");
       out.println("<path d='M0 105.46 L2.5 106.95 L2.5 103.63 L0 102.14 L0 105.46 Z' class='st7'/>");
      out.println("</g>");
      
      
      out.println("<g id='shape51-31' v:mID='51' v:groupContext='groupContent'>");
       out.println("<v:textBlock v:margins='rect(4,4,4,4)' v:tabSpace='42.5197'/>");
       out.println("<v:textRect cx='16.0545' cy='115.754' width='16.76' height='17.6036'/>");
       out.println("<text x='14.05' y='118.15' class='st8' v:langID='2052'><v:paragraph v:horizAlign='1'/><v:tabList/>A</text>");   
    out.println("</g>");
    out.println("</g>");
     out.println("<g id='shape60-33' v:mID='60' v:groupContext='shape' transform='translate(84.4972,0)'>");
      out.println("<title>Circle.76</title>");
      out.println("<v:userDefs>");
       out.println("<v:ud v:nameU='visVersion' v:val='VT0(12):26'/>");
      out.println("</v:userDefs>");
      out.println("<path d='M0 89.21 A16.8994 17.7453 0 1 1 33.8 89.21 A16.8994 17.7453 0 0 1 0 89.21 Z' class='st1'/>");
    out.println("</g>");
     
     out.println("<g id='shape61-35' v:mID='61' v:groupContext='shape' transform='translate(16.8994,0)'>");
      out.println("<title>Circle.75</title>");
      out.println("<v:userDefs>");
       out.println("<v:ud v:nameU='visVersion' v:val='VT0(12):26'/>");
      out.println("</v:userDefs>");
      out.println("<path d='M0 89.21 A16.8994 17.7453 0 1 1 33.8 89.21 A16.8994 17.7453 0 0 1 0 89.21 Z' class='st1'/>");
    out.println("</g>");
 //----------1
     out.println("<g id='group62-37' transform='translate(85.6173,-42.0002)' v:mID='62' v:groupContext='group'>");
      out.println("<v:custProps>");
       out.println("<v:cp v:nameU='ShapeClass' v:lbl='ShapeClass' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(连接性)'/>");
       out.println("<v:cp v:nameU='ShapeType' v:lbl='ShapeType' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(概念)'/>");

       out.println("<v:cp v:nameU='SubShapeType' v:lbl='SubShapeType' v:type='0' v:invis='true' v:ask='false' v:langID='2052' v:val='VT4(网关)'/>");
       out.println("<v:cp v:nameU='Manufacturer' v:lbl='制造商' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false'  v:langID='2052'/>");
       out.println("<v:cp v:nameU='ProductNumber' v:lbl='产品编号' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='PartNumber' v:lbl='部件号' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='ProductDescription' v:lbl='产品说明' v:type='0' v:sortKey='Equipment' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='AssetNumber' v:lbl='资产号' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='SerialNumber' v:lbl='序列号' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='Location' v:lbl='位置' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='Building' v:lbl='建筑物' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");

       out.println("<v:cp v:nameU='Room' v:lbl='房间' v:type='0' v:sortKey='Asset' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='NetworkName' v:lbl='网络名称' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='IPAddress' v:lbl='IP 地址' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='SubnetMask' v:lbl='子网掩码' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='AdminInterface' v:lbl='管理接口' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='NumberofPorts' v:lbl='端口数目' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false' v:langID='2052'/>");
       out.println("<v:cp v:nameU='MACAddress' v:lbl='MAC 地址' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false'  v:langID='2052'/>");
       out.println("<v:cp v:nameU='CommunityString' v:lbl='团体字符串' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false'  v:langID='2052'/>");
       out.println("<v:cp v:nameU='NetworkDescription' v:lbl='网络说明' v:type='0' v:sortKey='Network' v:invis='false' v:ask='false'  v:langID='2052'/>");

      out.println("</v:custProps>");
      out.println("<v:userDefs>");
       out.println("<v:ud v:nameU='HasText' v:val='VT0(1):5'/>");
       out.println("<v:ud v:nameU='ShapeClass' v:val='VT0(4):26'/>");
       out.println("<v:ud v:nameU='ShapeType' v:val='VT0(7):26'/>");
       out.println("<v:ud v:nameU='SubShapeType' v:val='VT0(30):26'/>");
       out.println("<v:ud v:nameU='visLegendShape' v:val='VT0(2):26'/>");
       out.println("<v:ud v:nameU='SolSH' v:val='VT14({BF0433D9-CD73-4EB5-8390-8653BE590246}):41'/>");
       out.println("<v:ud v:nameU='visVersion' v:prompt='' v:val='VT0(12):26'/>");

      out.println("</v:userDefs>");
      out.println("<title>Gateway.81</title>");
      out.println("<desc>B</desc>");
      
      out.println("<g id='shape63-38' v:mID='63' v:groupContext='shape' transform='translate(-3.20149,0)'>");
      out.println(" <title>工作表.63</title>");
       out.println("<path d='");
       out.println("M34.04 69.79 L34.04 73.11 A16.4319 16.9809 0 0 1 35.03 76.51 A11.2366 11.612 -180 0 0 34.04 69.79 Z");
          out.println(" M34.02 91.46 L34.02 83.76 A12.3279 12.7397 -180 0 0 35.11 79.63 A15.0879 15.592 -180 0 0 35.03 76.83");
          out.println(" A12.8033 13.231 0 0 1 34.02 79.98 L34.02 73.11 L34.02 69.79 L34.02 59.75 L17.96 50.17 L1.91 59.75");
         out.println("L1.91 77.83 A2.19803 2.27146 -180 0 0 0.03 80.46 L0.03 82.29 A2.13159 2.2028 0 0 1 1.91 81 L1.91");
         out.println("84.82 A3.70741 3.83126 0 0 1 0.05 82.29 L0.04 84.57 A4.24376 4.38553 -180 0 0 1.91 88.15 L1.91 97.37");
           out.println("L17.96 106.95 L34.02 97.37 L34.02 94.79 L36.35 96.18 L36.35 92.85 L34.02 91.46 Z M35.03 76.83 A12.8033");
           out.println("13.231 -180 0 0 35.06 76.66 A16.4319 16.9809 -180 0 0 35.03 76.51 A11.2366 11.612 0 0 1 35.01 76.67");
           out.println("A15.0879 15.592 0 0 1 35.03 76.83 Z' class='st2'/>");
     out.println("</g>");

      out.println("<g id='shape64-40' v:mID='64' v:groupContext='shape' transform='translate(16.0542,0)'>");
       out.println("<title>工作表.64</title>");
       out.println("<path d='M0 69.32 L0 106.95 L16.05 97.37 L16.05 59.75 L0 69.32 Z' class='st3'/>");
      out.println("</g>");
      
      out.println("<g id='shape65-43' v:mID='65' v:groupContext='shape' transform='translate(0,-37.6277)'>");
       out.println("<title>工作表.65</title>");
       out.println("<path d='M0 97.37 L16.05 106.95 L32.11 97.37 L16.05 87.79 L0 97.37 Z' class='st4'/>");
      out.println("</g>");

      out.println("<g id='shape66-46' v:mID='66' v:groupContext='shape'>");
       out.println("<title>工作表.66</title>");
       out.println("<path d='M0 97.37 L16.05 106.95 L16.05 69.32 L0 59.75 L0 97.37 Z' class='st5'/>");
    out.println("</g>");
     
      out.println("<g id='shape67-49' v:mID='67' v:groupContext='shape'>");
       out.println("<title>工作表.67</title>");
       out.println("<path d='M0 59.75 L0 97.37 L16.05 106.95 L32.11 97.37 L32.11 59.75 L16.05 50.17 L0 59.75' class='st6'/>");
    out.println("</g>");

      out.println("<g id='shape68-52' v:mID='68' v:groupContext='shape' transform='translate(8.06765,-15.0853)'>");
       out.println("<title>工作表.68</title>");
       out.println("<path d='M0 98.77 L4.4 95.72 L4.41 99.82 L6.68 101.15 A12.8033 13.231 -180 0 0 25.08 91.75 A16.4319 16.9809 -180");
          out.println("0 0 24.06 88.2 L24.06 84.87 A11.2366 11.612 0 0 1 25.03 91.76 A15.0879 15.592 0 0 1 25.14 94.72");
          out.println("A12.3279 12.7397 0 0 1 6.68 104.47 L4.34 103.07 L4.33 106.95 L0 98.77 Z' class='st7'/>");
      out.println("</g>");
      
      out.println("<g id='shape69-54' v:mID='69' v:groupContext='shape' transform='translate(-1.90865,-18.7972)'>");
       out.println("<title>工作表.69</title>");
       out.println("<path d='M9.79 102.43 L5.51 94.18 L5.53 98.26 L3.03 96.77 A2.19803 2.27146 -180 0 0 0.03 99.26 L0.04 103.37 A4.24376");
          out.println("4.38553 -180 0 0 1.91 106.95 L1.91 103.63 A3.70741 3.83126 0 0 1 0.05 101.09 A2.08251 2.15208 0");
          out.println("0 1 3.03 100.1 L5.53 101.59 L5.46 105.47 L9.79 102.43 Z' class='st7'/>");
    out.println("</g>");

      out.println("<g id='shape70-56' v:mID='70' v:groupContext='shape' transform='translate(31.9491,-10.7709)'>");
       out.println("<title>工作表.70</title>");
       out.println("<path d='M0 105.46 L2.5 106.95 L2.5 103.63 L0 102.14 L0 105.46 Z' class='st7'/>");
      out.println("</g>");
      
      out.println("<g id='shape62-58' v:mID='62' v:groupContext='groupContent'>");
       out.println("<v:textBlock v:margins='rect(4,4,4,4)' v:tabSpace='42.5197'/>");
       out.println("<v:textRect cx='16.0545' cy='115.754' width='16.76' height='17.6036'/>");
       out.println("<text x='14.05' y='118.15' class='st8' v:langID='2052'><v:paragraph v:horizAlign='1'/><v:tabList/>B</text> ");   
      out.println("</g>");
      out.println("</g>");
      out.println("</g>");  
      out.println("</g>");
      System.out.println("------------------------------------------");
   }
    out.println("</svg>");
   stat.close();
   conn.close();
  }catch(Exception e){
   e.printStackTrace();
   throw new ServletException(e.getMessage());
  }
 }
}


--  作者:admin
--  发布时间:4/29/2010 10:47:00 AM

--  
一个格式正确的SVG文档,结构应该是这样的:
开始
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg>
</svg>
结束

注意只能有一个根节点svg!


--  作者:admin
--  发布时间:4/30/2010 12:14:00 AM

--  
把生成<svg> 的语句移到while循环外部
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
6,621.094ms