• dom4j_01_01


    1、

    使用的svg图形为:“FZX069A开关站图_V1.svg”,内容为:

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <svg width="5650" height="2850" viewBox="0 0 5650 2850" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cge="http://iec.ch/TC57/2005/SVG-schema#" xmlns:hzsvg="http://holleygrid.cn/svg"><style type="text/css"/><defs><symbol id="Pole_逻辑杆塔" viewBox="0.0000 0.0000 2.0000 2.0000"><circle cx="1" cy="1" r="1" stroke="rgb(0, 64, 128)" stroke-width="6.66666666666667E-02" fill="rgb(128, 255, 255)"/></symbol><symbol id="Breaker_专题图_断路器" viewBox="0.0000 0.0000 4.0493 8.0000"><polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="rgb(0, 128, 0)" points="0.0176, 1.0070 0.0176, 6.9866 4.0493, 6.9866 4.0493, 1.0070 0.0176, 1.0070"/><polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="none" points="2.0246, 1.0000 2.0246, 0.0000"/><polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="none" points="2.0246, 7.0000 2.0246, 8.0000"/></symbol></defs><g id="ACLineSegmentClass"><g id="162450924"><polyline stroke="rgb(0, 255, 215)" stroke-width="6" fill="none" points="2714.8936, 1028.0852 2714.8936, 1664.6808" stroke-dasharray="6 4" node1="227900169" node2="227900171" _Dataid="1103792039"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="ACLineSegment_1103792039" ObjectName="F069A分支 [FZX069A]-[FZX069A-1#]"/></metadata></g><g id="162450921"><polyline stroke="rgb(0, 255, 215)" stroke-width="6" fill="none" points="2885.1064, 1028.0852 2885.1064, 1657.8724" stroke-dasharray="6 4" node1="227900170" node2="227900172" _Dataid="1103791956"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="ACLineSegment_1103791956" ObjectName="白鹿742线 [13#]-[FZX069A]"/></metadata></g><g id="1616201274065"><polyline stroke="rgb(255, 255, 153)" stroke-width="2" fill="none" points="2714.8936, 994.0426 2714.8936, 1028.0852" node1="227900168" node2="227900169" _Dataid="1001105931182"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="ACLineSegment_1001105931182" ObjectName="站内连接线"/></metadata></g><g id="1616201274066"><polyline stroke="rgb(255, 255, 153)" stroke-width="2" fill="none" points="2885.1064, 994.0426 2885.1064, 1028.0852" node1="227900168" node2="227900170" _Dataid="1001105931183"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="ACLineSegment_1001105931183" ObjectName="站内连接线"/></metadata></g></g><g id="OtherClass"><g id="1651202288200"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3256.6400, 1936.0000 3256.6400, 2000.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288193"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2000.0000, 800.0000 2000.0000, 2000.0000 3600.0000, 2000.0000 3600.0000, 800.0000 2000.0000, 800.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288194"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1840.0000 2960.0000, 2000.0000 3600.0000, 2000.0000 3600.0000, 1840.0000 2960.0000, 1840.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288195"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3355.5200, 1840.0000 3355.5200, 2000.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288196"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1936.0000 3355.5200, 1936.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288197"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1968.0000 3600.0000, 1968.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288198"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3058.8800, 1936.0000 3058.8800, 2000.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1651202288199"><polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3157.7600, 1936.0000 3157.7600, 2000.0000" node1="0" node2="0"/><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g></g><g id="PoleClass"><g id="1633201503112"><use x="2713.89360000007" y="1663.68079999834" width="2" height="2" transform="scale(1.000000, 1.000000) translate(0.000000, 0.000000) rotate(0.000000, 2714.893600, 1664.680800)" xlink:href="#Pole_逻辑杆塔" node1="227900171" node2="0" _Dataid="1103618159"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="Pole_1103618159" ObjectName="FZX069A-1"/></metadata></g></g><g id="BusbarSectionClass"><g id="1617200171660"><polyline stroke="rgb(255, 255, 0)" stroke-width="6" fill="none" points="2629.7872, 994.0426 2970.2128, 994.0426" node1="227900168" node2="0" _Dataid="1104478657"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="BusbarSection_1104478657" ObjectName="母线"/></metadata></g></g><g id="BreakerClass"><g id="1628200401551"><use x="2883.08175999993" y="1671.87239999697" width="4.04928" height="8" transform="scale(4.500000, 4.500000) translate(-2243.971644, -1303.456311) rotate(0.000000, 2885.106400, 1675.872400)" xlink:href="#Breaker_专题图_断路器" node1="227900172" node2="227900173" stationin="0" _Dataid="1112423809"/><metadata><cge:Layer_Ref ObjectName="MainLayer"/><cge:PSR_Ref ObjectID="Breaker_1112423809" ObjectName="ZW3047A"/></metadata></g></g><g id="TextClass"><g id="1644205771100"><text font-size="6" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.2" x="2701.39360000007" y="1672.93079999834" transform="rotate(360.000000, 2714.893600, 1672.930800)" class=".Text">FZX069A-1</text><metadata><cge:Layer_Ref ObjectName="MainLayer"/></metadata></g><g id="1644205771101"><text font-size="16" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.533333333333333" x="2897.10639999993" y="1657.87239999697" transform="rotate(360.000000, 2925.106400, 1657.872400)" class=".Text">ZW3047A</text><metadata><cge:Layer_Ref ObjectName="MainLayer"/></metadata></g><g id="1644205771102"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2765" y="952" transform="rotate(360.000000, 2800.000000, 952.000000)" class=".Text">FZX069A</text><metadata><cge:Layer_Ref ObjectName="MainLayer"/></metadata></g><g id="1650207777189"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2984.44000000134" y="1960" transform="rotate(360.000000, 3009.440000, 1960.000000)" class=".Text">校 核</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777191"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3182.20000000112" y="1960" transform="rotate(360.000000, 3207.200000, 1960.000000)" class=".Text">日 期</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777193"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2984.44000000134" y="1992" transform="rotate(360.000000, 3009.440000, 1992.000000)" class=".Text">审 核</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777195"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3182.20000000112" y="1992" transform="rotate(360.000000, 3207.200000, 1992.000000)" class=".Text">日 期</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777197"><text font-size="32" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="1.06666666666667" x="3029.75999999978" y="1897.59999999776" transform="rotate(360.000000, 3157.760000, 1897.600000)" class=".Text">浙江温州供电公司</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777199"><text font-size="28" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.933333333333333" x="3428.75999999978" y="1897.59999999776" transform="rotate(360.000000, 3477.760000, 1897.600000)" class=".Text">FZX069A</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777201"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3103.3200000003" y="1960" transform="rotate(360.000000, 3108.320000, 1960.000000)" class=".Text"> </text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777203"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3301.08000000007" y="1960" transform="rotate(360.000000, 3306.080000, 1960.000000)" class=".Text"> </text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777205"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3078.3200000003" y="1992" transform="rotate(360.000000, 3108.320000, 1992.000000)" class=".Text">夏陈喆</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777207"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3256.08000000007" y="1992" transform="rotate(360.000000, 3306.080000, 1992.000000)" class=".Text">2015-08-05</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g><g id="1650207777209"><text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3382.75999999978" y="1992" transform="rotate(360.000000, 3477.760000, 1992.000000)" class=".Text">更新日期:2015-08-05</text><metadata><cge:Layer_Ref ObjectName="BranchLayer"/></metadata></g></g></svg>
    3 <?DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"?>

    2、

    此格式比较难以阅读,转换(PrettyPrint)后的内容形式为:

      1 <?xml version="1.0" encoding="utf-8"?>
      2 
      3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cge="http://iec.ch/TC57/2005/SVG-schema#" xmlns:hzsvg="http://holleygrid.cn/svg" width="5650" height="2850" viewBox="0 0 5650 2850">
      4   <style type="text/css"/>
      5   <defs>
      6     <symbol id="Pole_逻辑杆塔" viewBox="0.0000 0.0000 2.0000 2.0000">
      7       <circle cx="1" cy="1" r="1" stroke="rgb(0, 64, 128)" stroke-width="6.66666666666667E-02" fill="rgb(128, 255, 255)"/>
      8     </symbol>
      9     <symbol id="Breaker_专题图_断路器" viewBox="0.0000 0.0000 4.0493 8.0000">
     10       <polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="rgb(0, 128, 0)" points="0.0176, 1.0070 0.0176, 6.9866 4.0493, 6.9866 4.0493, 1.0070 0.0176, 1.0070"/>
     11       <polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="none" points="2.0246, 1.0000 2.0246, 0.0000"/>
     12       <polyline stroke="rgb(0, 128, 0)" stroke-width="0.134976" fill="none" points="2.0246, 7.0000 2.0246, 8.0000"/>
     13     </symbol>
     14   </defs>
     15   <g id="ACLineSegmentClass">
     16     <g id="162450924">
     17       <polyline stroke="rgb(0, 255, 215)" stroke-width="6" fill="none" points="2714.8936, 1028.0852 2714.8936, 1664.6808" stroke-dasharray="6 4" node1="227900169" node2="227900171" _Dataid="1103792039"/>
     18       <metadata>
     19         <cge:Layer_Ref ObjectName="MainLayer"/>
     20         <cge:PSR_Ref ObjectID="ACLineSegment_1103792039" ObjectName="F069A分支 [FZX069A]-[FZX069A-1#]"/>
     21       </metadata>
     22     </g>
     23     <g id="162450921">
     24       <polyline stroke="rgb(0, 255, 215)" stroke-width="6" fill="none" points="2885.1064, 1028.0852 2885.1064, 1657.8724" stroke-dasharray="6 4" node1="227900170" node2="227900172" _Dataid="1103791956"/>
     25       <metadata>
     26         <cge:Layer_Ref ObjectName="MainLayer"/>
     27         <cge:PSR_Ref ObjectID="ACLineSegment_1103791956" ObjectName="白鹿742线 [13#]-[FZX069A]"/>
     28       </metadata>
     29     </g>
     30     <g id="1616201274065">
     31       <polyline stroke="rgb(255, 255, 153)" stroke-width="2" fill="none" points="2714.8936, 994.0426 2714.8936, 1028.0852" node1="227900168" node2="227900169" _Dataid="1001105931182"/>
     32       <metadata>
     33         <cge:Layer_Ref ObjectName="MainLayer"/>
     34         <cge:PSR_Ref ObjectID="ACLineSegment_1001105931182" ObjectName="站内连接线"/>
     35       </metadata>
     36     </g>
     37     <g id="1616201274066">
     38       <polyline stroke="rgb(255, 255, 153)" stroke-width="2" fill="none" points="2885.1064, 994.0426 2885.1064, 1028.0852" node1="227900168" node2="227900170" _Dataid="1001105931183"/>
     39       <metadata>
     40         <cge:Layer_Ref ObjectName="MainLayer"/>
     41         <cge:PSR_Ref ObjectID="ACLineSegment_1001105931183" ObjectName="站内连接线"/>
     42       </metadata>
     43     </g>
     44   </g>
     45   <g id="OtherClass">
     46     <g id="1651202288200">
     47       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3256.6400, 1936.0000 3256.6400, 2000.0000" node1="0" node2="0"/>
     48       <metadata>
     49         <cge:Layer_Ref ObjectName="BranchLayer"/>
     50       </metadata>
     51     </g>
     52     <g id="1651202288193">
     53       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2000.0000, 800.0000 2000.0000, 2000.0000 3600.0000, 2000.0000 3600.0000, 800.0000 2000.0000, 800.0000" node1="0" node2="0"/>
     54       <metadata>
     55         <cge:Layer_Ref ObjectName="BranchLayer"/>
     56       </metadata>
     57     </g>
     58     <g id="1651202288194">
     59       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1840.0000 2960.0000, 2000.0000 3600.0000, 2000.0000 3600.0000, 1840.0000 2960.0000, 1840.0000" node1="0" node2="0"/>
     60       <metadata>
     61         <cge:Layer_Ref ObjectName="BranchLayer"/>
     62       </metadata>
     63     </g>
     64     <g id="1651202288195">
     65       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3355.5200, 1840.0000 3355.5200, 2000.0000" node1="0" node2="0"/>
     66       <metadata>
     67         <cge:Layer_Ref ObjectName="BranchLayer"/>
     68       </metadata>
     69     </g>
     70     <g id="1651202288196">
     71       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1936.0000 3355.5200, 1936.0000" node1="0" node2="0"/>
     72       <metadata>
     73         <cge:Layer_Ref ObjectName="BranchLayer"/>
     74       </metadata>
     75     </g>
     76     <g id="1651202288197">
     77       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="2960.0000, 1968.0000 3600.0000, 1968.0000" node1="0" node2="0"/>
     78       <metadata>
     79         <cge:Layer_Ref ObjectName="BranchLayer"/>
     80       </metadata>
     81     </g>
     82     <g id="1651202288198">
     83       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3058.8800, 1936.0000 3058.8800, 2000.0000" node1="0" node2="0"/>
     84       <metadata>
     85         <cge:Layer_Ref ObjectName="BranchLayer"/>
     86       </metadata>
     87     </g>
     88     <g id="1651202288199">
     89       <polyline stroke="rgb(0, 0, 0)" stroke-width="2" fill="none" points="3157.7600, 1936.0000 3157.7600, 2000.0000" node1="0" node2="0"/>
     90       <metadata>
     91         <cge:Layer_Ref ObjectName="BranchLayer"/>
     92       </metadata>
     93     </g>
     94   </g>
     95   <g id="PoleClass">
     96     <g id="1633201503112">
     97       <use x="2713.89360000007" y="1663.68079999834" width="2" height="2" transform="scale(1.000000, 1.000000) translate(0.000000, 0.000000) rotate(0.000000, 2714.893600, 1664.680800)" xlink:href="#Pole_逻辑杆塔" node1="227900171" node2="0" _Dataid="1103618159"/>
     98       <metadata>
     99         <cge:Layer_Ref ObjectName="MainLayer"/>
    100         <cge:PSR_Ref ObjectID="Pole_1103618159" ObjectName="FZX069A-1"/>
    101       </metadata>
    102     </g>
    103   </g>
    104   <g id="BusbarSectionClass">
    105     <g id="1617200171660">
    106       <polyline stroke="rgb(255, 255, 0)" stroke-width="6" fill="none" points="2629.7872, 994.0426 2970.2128, 994.0426" node1="227900168" node2="0" _Dataid="1104478657"/>
    107       <metadata>
    108         <cge:Layer_Ref ObjectName="MainLayer"/>
    109         <cge:PSR_Ref ObjectID="BusbarSection_1104478657" ObjectName="母线"/>
    110       </metadata>
    111     </g>
    112   </g>
    113   <g id="BreakerClass">
    114     <g id="1628200401551">
    115       <use x="2883.08175999993" y="1671.87239999697" width="4.04928" height="8" transform="scale(4.500000, 4.500000) translate(-2243.971644, -1303.456311) rotate(0.000000, 2885.106400, 1675.872400)" xlink:href="#Breaker_专题图_断路器" node1="227900172" node2="227900173" stationin="0" _Dataid="1112423809"/>
    116       <metadata>
    117         <cge:Layer_Ref ObjectName="MainLayer"/>
    118         <cge:PSR_Ref ObjectID="Breaker_1112423809" ObjectName="ZW3047A"/>
    119       </metadata>
    120     </g>
    121   </g>
    122   <g id="TextClass">
    123     <g id="1644205771100">
    124       <text font-size="6" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.2" x="2701.39360000007" y="1672.93079999834" transform="rotate(360.000000, 2714.893600, 1672.930800)" class=".Text">FZX069A-1</text>
    125       <metadata>
    126         <cge:Layer_Ref ObjectName="MainLayer"/>
    127       </metadata>
    128     </g>
    129     <g id="1644205771101">
    130       <text font-size="16" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.533333333333333" x="2897.10639999993" y="1657.87239999697" transform="rotate(360.000000, 2925.106400, 1657.872400)" class=".Text">ZW3047A</text>
    131       <metadata>
    132         <cge:Layer_Ref ObjectName="MainLayer"/>
    133       </metadata>
    134     </g>
    135     <g id="1644205771102">
    136       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2765" y="952" transform="rotate(360.000000, 2800.000000, 952.000000)" class=".Text">FZX069A</text>
    137       <metadata>
    138         <cge:Layer_Ref ObjectName="MainLayer"/>
    139       </metadata>
    140     </g>
    141     <g id="1650207777189">
    142       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2984.44000000134" y="1960" transform="rotate(360.000000, 3009.440000, 1960.000000)" class=".Text">校 核</text>
    143       <metadata>
    144         <cge:Layer_Ref ObjectName="BranchLayer"/>
    145       </metadata>
    146     </g>
    147     <g id="1650207777191">
    148       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3182.20000000112" y="1960" transform="rotate(360.000000, 3207.200000, 1960.000000)" class=".Text">日 期</text>
    149       <metadata>
    150         <cge:Layer_Ref ObjectName="BranchLayer"/>
    151       </metadata>
    152     </g>
    153     <g id="1650207777193">
    154       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="2984.44000000134" y="1992" transform="rotate(360.000000, 3009.440000, 1992.000000)" class=".Text">审 核</text>
    155       <metadata>
    156         <cge:Layer_Ref ObjectName="BranchLayer"/>
    157       </metadata>
    158     </g>
    159     <g id="1650207777195">
    160       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3182.20000000112" y="1992" transform="rotate(360.000000, 3207.200000, 1992.000000)" class=".Text">日 期</text>
    161       <metadata>
    162         <cge:Layer_Ref ObjectName="BranchLayer"/>
    163       </metadata>
    164     </g>
    165     <g id="1650207777197">
    166       <text font-size="32" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="1.06666666666667" x="3029.75999999978" y="1897.59999999776" transform="rotate(360.000000, 3157.760000, 1897.600000)" class=".Text">浙江温州供电公司</text>
    167       <metadata>
    168         <cge:Layer_Ref ObjectName="BranchLayer"/>
    169       </metadata>
    170     </g>
    171     <g id="1650207777199">
    172       <text font-size="28" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.933333333333333" x="3428.75999999978" y="1897.59999999776" transform="rotate(360.000000, 3477.760000, 1897.600000)" class=".Text">FZX069A</text>
    173       <metadata>
    174         <cge:Layer_Ref ObjectName="BranchLayer"/>
    175       </metadata>
    176     </g>
    177     <g id="1650207777201">
    178       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3103.3200000003" y="1960" transform="rotate(360.000000, 3108.320000, 1960.000000)" class=".Text"></text>
    179       <metadata>
    180         <cge:Layer_Ref ObjectName="BranchLayer"/>
    181       </metadata>
    182     </g>
    183     <g id="1650207777203">
    184       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3301.08000000007" y="1960" transform="rotate(360.000000, 3306.080000, 1960.000000)" class=".Text"></text>
    185       <metadata>
    186         <cge:Layer_Ref ObjectName="BranchLayer"/>
    187       </metadata>
    188     </g>
    189     <g id="1650207777205">
    190       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3078.3200000003" y="1992" transform="rotate(360.000000, 3108.320000, 1992.000000)" class=".Text">夏陈喆</text>
    191       <metadata>
    192         <cge:Layer_Ref ObjectName="BranchLayer"/>
    193       </metadata>
    194     </g>
    195     <g id="1650207777207">
    196       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3256.08000000007" y="1992" transform="rotate(360.000000, 3306.080000, 1992.000000)" class=".Text">2015-08-05</text>
    197       <metadata>
    198         <cge:Layer_Ref ObjectName="BranchLayer"/>
    199       </metadata>
    200     </g>
    201     <g id="1650207777209">
    202       <text font-size="20" font-family="SimSun" stroke="rgb(0, 0, 0)" stroke-width="0.666666666666667" x="3382.75999999978" y="1992" transform="rotate(360.000000, 3477.760000, 1992.000000)" class=".Text">更新日期:2015-08-05</text>
    203       <metadata>
    204         <cge:Layer_Ref ObjectName="BranchLayer"/>
    205       </metadata>
    206     </g>
    207   </g>
    208 </svg><?DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"?>

    3、

    转换的代码为:

     1 public class Tdom4jTest
     2 {
     3 // dom4j 的两个 jar文件
     4 //    (1)、dom4j-1.6.1.jar
     5 //    (2)、jaxen-1.1-beta-6.jar ==> 这个是用于支持xpath的
     6     
     7 // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
     8 //    打开XML文件
     9     
    10     // 打开XML文件 (不带 命名空间)
    11     public static Document DocumentGet_byXmlFile(String _strFullFileName) throws Exception
    12     {
    13         // 通过 单例的DocumentFactory对象 来加载XML文件
    14         SAXReader sr = new SAXReader();
    15         //Document doc = sr.read(_strFullFileName);
    16         //return doc;
    17         File file = new File(_strFullFileName);
    18         return sr.read(file);
    19     }
    20 
    21 // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    22 //    保存文件
    23     
    24     // 通过Document 来保存XML文件
    25     public static void Save_byDoc(Document _doc, String _strFullFileName, boolean _bEscapeText) throws Exception
    26     {
    27         OutputFormat of = OutputFormat.createPrettyPrint();
    28         of.setEncoding("utf-8");
    29         //of.setTrimText(false);
    30         //of.setLineSeparator("
    ");
    31 
    32         FileOutputStream fos = new FileOutputStream( _strFullFileName );
    33         OutputStreamWriter osw = new java.io.OutputStreamWriter(fos, "utf-8");
    34         XMLWriter writer = new XMLWriter(osw, of);
    35         writer.setEscapeText(_bEscapeText);
    36         writer.write( _doc );
    37         writer.close();
    38     }
    39     
    40 
    41 // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    42 
    43     public static void main(String[] args) throws Exception
    44     {
    45         String strFullFIleName = "F:\ZC_Code_E\workspace__MyEclipse2013\dom4j_test\FZX069A开关站图_V1.svg";
    46         String strFullFIleName1 = "F:\ZC_Code_E\workspace__MyEclipse2013\dom4j_test\FZX069A开关站图_V1__Z.svg";
    47         
    48         Document doc = Tdom4jTest.DocumentGet_byXmlFile(strFullFIleName);
    49         Tdom4jTest.Save_byDoc(doc, strFullFIleName1, false);
    50     }
    51 
    52 }

    C

  • 相关阅读:
    mysql 数据库检查与修复的办法
    SECPATH透明模式下VLAN透传配置实例
    腾讯QQ所有的服务器
    AutoRuns 9.13 汉化版
    IP地址在数据库中的存储解决方案
    DNS智能解析 for windows 2003
    Windows Media Player ActiveX 控件参数
    删除nvidia右键菜单
    通过js控制cookies
    正确使用|(按位或)和||(逻辑或)
  • 原文地址:https://www.cnblogs.com/codeskilla/p/5025195.html
Copyright © 2020-2023  润新知